UserController.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <?php
  2. namespace App\Http\Controllers\User;
  3. use App\Http\Controllers\BaseController;
  4. use App\Http\Logic\User\UserLogic;
  5. class UserController extends BaseController
  6. {
  7. /**
  8. * @SWG\Get(
  9. * path="/user/info",
  10. * tags={"用户管理"},
  11. * summary="获取用户信息",
  12. * description="获取用户信息接口",
  13. * produces={"application/json"},
  14. * @SWG\Response(
  15. * response="200",
  16. * description="success",
  17. * @SWG\Schema(
  18. * @SWG\Property(
  19. * property="user_head_img_url",
  20. * type="string",
  21. * description="用户头像"
  22. * ),
  23. * @SWG\Property(
  24. * property="user_nickname",
  25. * type="string",
  26. * description="用户昵称"
  27. * ),
  28. * @SWG\Property(
  29. * property="user_sex",
  30. * type="string",
  31. * description="用户性别"
  32. * ),
  33. * @SWG\Property(
  34. * property="user_balance",
  35. * type="string",
  36. * description="'用户可提现余额(单位为分)"
  37. * ),
  38. * @SWG\Property(
  39. * property="user_unreceive_balance",
  40. * type="string",
  41. * description="用户未结算金额(单位为分"
  42. * ),
  43. * @SWG\Property(
  44. * property="user_ucrash_balance",
  45. * type="string",
  46. * description="用户累计提现金额(单位为分"
  47. * ),
  48. * @SWG\Property(
  49. * property="created_at",
  50. * type="string",
  51. * description="'注册时间"
  52. * ),
  53. * @SWG\Property(
  54. * property="user_fans_num",
  55. * type="string",
  56. * description="'用户粉丝数量"
  57. * ),
  58. * @SWG\Property(
  59. * property="last_month_money",
  60. * type="string",
  61. * description="'上月预估收益"
  62. * ),
  63. * @SWG\Property(
  64. * property="month_money",
  65. * type="string",
  66. * description="'本月预估收益"
  67. * )
  68. * )
  69. * ),
  70. * @SWG\Response(
  71. * response="403",
  72. * description="fail",
  73. * @SWG\Schema(ref="#/definitions/ErrorBean")
  74. * )
  75. * )
  76. */
  77. public function getUserInfo()
  78. {
  79. $data = UserLogic::getUserInfoLogic();
  80. return $this->success($data);
  81. }
  82. /**
  83. * @SWG\Post(
  84. * path="/user/fans/list",
  85. * tags={"用户管理"},
  86. * summary="用户粉丝列表接口",
  87. * description="用户粉丝列表接口",
  88. * produces={"application/json"},
  89. * @SWG\Parameter(
  90. * name="page",
  91. * in="query",
  92. * description="第几页",
  93. * type="string"
  94. * ),
  95. * @SWG\Parameter(
  96. * name="page_size",
  97. * in="query",
  98. * description="每页数量",
  99. * type="string"
  100. * ),
  101. * @SWG\Parameter(
  102. * name="type",
  103. * in="query",
  104. * description="粉丝类型(1未激活2已激活)",
  105. * type="string"
  106. * ),
  107. * @SWG\Response(
  108. * response="200",
  109. * description="success",
  110. * @SWG\Schema(ref="#/definitions/GetFansListResultBean")
  111. * ),
  112. * @SWG\Response(
  113. * response="403",
  114. * description="fail",
  115. * @SWG\Schema(ref="#/definitions/ErrorBean")
  116. * )
  117. * )
  118. */
  119. public function getFansList()
  120. {
  121. $datas = UserLogic::getFansListLogic();
  122. return $this->success($datas);
  123. }
  124. /**
  125. * @SWG\Get(
  126. * path="/user/fianance/list",
  127. * tags={"用户管理"},
  128. * summary="收支明细列表接口",
  129. * description="收支明细列表接口",
  130. * produces={"application/json"},
  131. * @SWG\Parameter(
  132. * name="page",
  133. * in="query",
  134. * description="第几页",
  135. * type="string"
  136. * ),
  137. * @SWG\Parameter(
  138. * name="page_size",
  139. * in="query",
  140. * description="每页数量",
  141. * type="string"
  142. * ),
  143. * @SWG\Parameter(
  144. * name="finance_type",
  145. * in="query",
  146. * description="流水类型(0全部1收入2提现)",
  147. * type="string"
  148. * ),
  149. * @SWG\Response(
  150. * response="200",
  151. * description="success",
  152. * @SWG\Schema(
  153. * @SWG\Property(
  154. * property="total",
  155. * type="string",
  156. * description="总数量"
  157. * ),
  158. * @SWG\Property(
  159. * property="list",
  160. * type="array",
  161. * description="数据",
  162. * @SWG\Items(
  163. * @SWG\Property(
  164. * property="finance_balance",
  165. * type="string",
  166. * description="流水金额(单位为分)"
  167. * ),
  168. * @SWG\Property(
  169. * property="finance_type",
  170. * type="string",
  171. * description="流水类型(1收入2支出)"
  172. * ),
  173. * @SWG\Property(
  174. * property="finance_number",
  175. * type="string",
  176. * description="流水编号"
  177. * ),
  178. * @SWG\Property(
  179. * property="created_at",
  180. * type="string",
  181. * description="创建时间"
  182. * ),
  183. * @SWG\Property(
  184. * property="cash_status",
  185. * type="string",
  186. * description="提现状态(0提现中1已到账2提现失败)"
  187. * )
  188. * )
  189. * ),
  190. * )
  191. * ),
  192. * @SWG\Response(
  193. * response="403",
  194. * description="fail",
  195. * @SWG\Schema(ref="#/definitions/ErrorBean")
  196. * )
  197. * )
  198. */
  199. public function getFinanceList()
  200. {
  201. $datas = UserLogic::getFinanceListLogic();
  202. return $this->success($datas);
  203. }
  204. /**
  205. * @SWG\Get(
  206. * path="/user/fianance/detail",
  207. * tags={"用户管理"},
  208. * summary="流水详情接口",
  209. * description="流水详情接口",
  210. * produces={"application/json"},
  211. * @SWG\Parameter(
  212. * name="id",
  213. * in="query",
  214. * description="流水ID",
  215. * type="string"
  216. * ),
  217. * @SWG\Response(
  218. * response="200",
  219. * description="success",
  220. * @SWG\Schema(
  221. * @SWG\Property(
  222. * property="finance_balance",
  223. * type="string",
  224. * description="流水金额"
  225. * ),
  226. * @SWG\Property(
  227. * property="finance_remark",
  228. * type="string",
  229. * description="流水备注"
  230. * ),
  231. * @SWG\Property(
  232. * property="finance_number",
  233. * type="string",
  234. * description="流水备注"
  235. * ),
  236. * @SWG\Property(
  237. * property="created_at",
  238. * type="string",
  239. * description="创建时间"
  240. * ),
  241. * @SWG\Property(
  242. * property="cash_status",
  243. * type="string",
  244. * description="提现状态(0提现中1已到账2提现失败)"
  245. * )
  246. * )
  247. * ),
  248. * @SWG\Response(
  249. * response="403",
  250. * description="fail",
  251. * @SWG\Schema(ref="#/definitions/ErrorBean")
  252. * )
  253. * )
  254. */
  255. public function getFinanceDetail()
  256. {
  257. $datas = UserLogic::getFinanceDetailLogic();
  258. return $this->success($datas);
  259. }
  260. /**
  261. * @SWG\Post(
  262. * path="/user/cash",
  263. * tags={"用户管理"},
  264. * summary="提现接口",
  265. * description="提现接口",
  266. * produces={"application/json"},
  267. * @SWG\Parameter(
  268. * name="amount",
  269. * in="query",
  270. * description="提现金额",
  271. * type="string"
  272. * ),
  273. * @SWG\Response(
  274. * response="200",
  275. * description="success",
  276. * @SWG\Schema(ref="#/definitions/SuccessBean")
  277. * ),
  278. * @SWG\Response(
  279. * response="403",
  280. * description="fail",
  281. * @SWG\Schema(ref="#/definitions/ErrorBean")
  282. * )
  283. * )
  284. */
  285. public function getCash()
  286. {
  287. UserLogic::getCashLogic();
  288. return $this->success([],200,"提现成功");
  289. }
  290. /**
  291. * @SWG\Get(
  292. * path="/user/recommend/url",
  293. * tags={"用户管理"},
  294. * summary="获取用户推广二维码接口",
  295. * description="获取用户推广二维码接口",
  296. * produces={"application/json"},
  297. * @SWG\Response(
  298. * response="200",
  299. * description="success",
  300. * @SWG\Schema(
  301. * @SWG\Property(
  302. * property="url",
  303. * type="string",
  304. * description="推广地址"
  305. * )
  306. * )
  307. * ),
  308. * @SWG\Response(
  309. * response="403",
  310. * description="fail",
  311. * @SWG\Schema(ref="#/definitions/ErrorBean")
  312. * )
  313. * )
  314. */
  315. public function getRecommendUrl()
  316. {
  317. $data = UserLogic::getRecommendUrlLogic();
  318. return $this->success($data);
  319. }
  320. /**
  321. * @SWG\Post(
  322. * path="/user/feedback",
  323. * tags={"用户管理"},
  324. * summary="反馈接口",
  325. * description="反馈接口",
  326. * produces={"application/json"},
  327. * @SWG\Parameter(
  328. * name="content",
  329. * in="query",
  330. * description="反馈内容",
  331. * type="string"
  332. * ),
  333. * @SWG\Response(
  334. * response="200",
  335. * description="success",
  336. * @SWG\Schema(ref="#/definitions/SuccessBean")
  337. * ),
  338. * @SWG\Response(
  339. * response="403",
  340. * description="fail",
  341. * @SWG\Schema(ref="#/definitions/ErrorBean")
  342. * )
  343. * )
  344. */
  345. public function feedback()
  346. {
  347. UserLogic::feedbackLogic();
  348. return $this->success();
  349. }
  350. }