UserController.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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. * )
  59. * ),
  60. * @SWG\Response(
  61. * response="403",
  62. * description="fail",
  63. * @SWG\Schema(ref="#/definitions/ErrorBean")
  64. * )
  65. * )
  66. */
  67. public function getUserInfo()
  68. {
  69. $data = UserLogic::getUserInfoLogic();
  70. return $this->success($data);
  71. }
  72. /**
  73. * @SWG\Post(
  74. * path="/user/fans/list",
  75. * tags={"用户管理"},
  76. * summary="用户粉丝列表接口",
  77. * description="用户粉丝列表接口",
  78. * produces={"application/json"},
  79. * @SWG\Parameter(
  80. * name="page",
  81. * in="query",
  82. * description="第几页",
  83. * type="string"
  84. * ),
  85. * @SWG\Parameter(
  86. * name="page_size",
  87. * in="query",
  88. * description="每页数量",
  89. * type="string"
  90. * ),
  91. * @SWG\Parameter(
  92. * name="type",
  93. * in="query",
  94. * description="粉丝类型(1未激活2已激活)",
  95. * type="string"
  96. * ),
  97. * @SWG\Response(
  98. * response="200",
  99. * description="success",
  100. * @SWG\Schema(ref="#/definitions/GetFansListResultBean")
  101. * ),
  102. * @SWG\Response(
  103. * response="403",
  104. * description="fail",
  105. * @SWG\Schema(ref="#/definitions/ErrorBean")
  106. * )
  107. * )
  108. */
  109. public function getFansList()
  110. {
  111. $datas = UserLogic::getFansListLogic();
  112. return $this->success($datas);
  113. }
  114. /**
  115. * @SWG\Get(
  116. * path="/user/fianance/list",
  117. * tags={"用户管理"},
  118. * summary="收支明细列表接口",
  119. * description="收支明细列表接口",
  120. * produces={"application/json"},
  121. * @SWG\Parameter(
  122. * name="page",
  123. * in="query",
  124. * description="第几页",
  125. * type="string"
  126. * ),
  127. * @SWG\Parameter(
  128. * name="page_size",
  129. * in="query",
  130. * description="每页数量",
  131. * type="string"
  132. * ),
  133. * @SWG\Parameter(
  134. * name="finance_type",
  135. * in="query",
  136. * description="流水类型(0全部1收入2提现)",
  137. * type="string"
  138. * ),
  139. * @SWG\Response(
  140. * response="200",
  141. * description="success",
  142. * @SWG\Schema(
  143. * @SWG\Property(
  144. * property="total",
  145. * type="string",
  146. * description="总数量"
  147. * ),
  148. * @SWG\Property(
  149. * property="list",
  150. * type="array",
  151. * description="数据",
  152. * @SWG\Items(
  153. * @SWG\Property(
  154. * property="finance_balance",
  155. * type="string",
  156. * description="流水金额(单位为分)"
  157. * ),
  158. * @SWG\Property(
  159. * property="finance_type",
  160. * type="string",
  161. * description="流水类型(1收入2支出)"
  162. * ),
  163. * @SWG\Property(
  164. * property="finance_number",
  165. * type="string",
  166. * description="流水编号"
  167. * ),
  168. * @SWG\Property(
  169. * property="created_at",
  170. * type="string",
  171. * description="创建时间"
  172. * ),
  173. * @SWG\Property(
  174. * property="cash_status",
  175. * type="string",
  176. * description="提现状态(0提现中1已到账2提现失败)"
  177. * )
  178. * )
  179. * ),
  180. * )
  181. * ),
  182. * @SWG\Response(
  183. * response="403",
  184. * description="fail",
  185. * @SWG\Schema(ref="#/definitions/ErrorBean")
  186. * )
  187. * )
  188. */
  189. public function getFinanceList()
  190. {
  191. $datas = UserLogic::getFinanceListLogic();
  192. return $this->success($datas);
  193. }
  194. /**
  195. * @SWG\Get(
  196. * path="/user/fianance/detail",
  197. * tags={"用户管理"},
  198. * summary="流水详情接口",
  199. * description="流水详情接口",
  200. * produces={"application/json"},
  201. * @SWG\Parameter(
  202. * name="id",
  203. * in="query",
  204. * description="流水ID",
  205. * type="string"
  206. * ),
  207. * @SWG\Response(
  208. * response="200",
  209. * description="success",
  210. * @SWG\Schema(
  211. * @SWG\Property(
  212. * property="finance_balance",
  213. * type="string",
  214. * description="流水金额"
  215. * ),
  216. * @SWG\Property(
  217. * property="finance_remark",
  218. * type="string",
  219. * description="流水备注"
  220. * ),
  221. * @SWG\Property(
  222. * property="finance_number",
  223. * type="string",
  224. * description="流水备注"
  225. * ),
  226. * @SWG\Property(
  227. * property="created_at",
  228. * type="string",
  229. * description="创建时间"
  230. * ),
  231. * @SWG\Property(
  232. * property="cash_status",
  233. * type="string",
  234. * description="提现状态(0提现中1已到账2提现失败)"
  235. * )
  236. * )
  237. * ),
  238. * @SWG\Response(
  239. * response="403",
  240. * description="fail",
  241. * @SWG\Schema(ref="#/definitions/ErrorBean")
  242. * )
  243. * )
  244. */
  245. public function getFinanceDetail()
  246. {
  247. $datas = UserLogic::getFinanceDetailLogic();
  248. return $this->success($datas);
  249. }
  250. /**
  251. * @SWG\Post(
  252. * path="/user/cash",
  253. * tags={"用户管理"},
  254. * summary="提现接口",
  255. * description="提现接口",
  256. * produces={"application/json"},
  257. * @SWG\Parameter(
  258. * name="amount",
  259. * in="query",
  260. * description="提现金额",
  261. * type="string"
  262. * ),
  263. * @SWG\Response(
  264. * response="200",
  265. * description="success",
  266. * @SWG\Schema(ref="#/definitions/SuccessBean")
  267. * ),
  268. * @SWG\Response(
  269. * response="403",
  270. * description="fail",
  271. * @SWG\Schema(ref="#/definitions/ErrorBean")
  272. * )
  273. * )
  274. */
  275. public function getCash()
  276. {
  277. UserLogic::getCashLogic();
  278. return $this->success();
  279. }
  280. /**
  281. * @SWG\Get(
  282. * path="/user/recommend/url",
  283. * tags={"用户管理"},
  284. * summary="获取用户推广二维码接口",
  285. * description="获取用户推广二维码接口",
  286. * produces={"application/json"},
  287. * @SWG\Response(
  288. * response="200",
  289. * description="success",
  290. * @SWG\Schema(
  291. * @SWG\Property(
  292. * property="url",
  293. * type="string",
  294. * description="推广地址"
  295. * )
  296. * )
  297. * ),
  298. * @SWG\Response(
  299. * response="403",
  300. * description="fail",
  301. * @SWG\Schema(ref="#/definitions/ErrorBean")
  302. * )
  303. * )
  304. */
  305. public function getRecommendUrl()
  306. {
  307. $data = UserLogic::getRecommendUrlLogic();
  308. return $this->success($data);
  309. }
  310. }