DataCentreController.java 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. package com.sqx.modules.datacentre.controller;
  2. import com.sqx.common.utils.Result;
  3. import com.sqx.modules.app.service.UserMoneyService;
  4. import com.sqx.modules.coupon.entity.TbCouponUser;
  5. import com.sqx.modules.coupon.service.TbCouponService;
  6. import com.sqx.modules.coupon.service.TbCouponUserService;
  7. import com.sqx.modules.datacentre.service.DataCentreService;
  8. import com.sqx.modules.errand.service.ErrandComplaintService;
  9. import com.sqx.modules.integral.dao.UserIntegralDetailsDao;
  10. import com.sqx.modules.integral.service.UserIntegralDetailsService;
  11. import com.sqx.modules.order.service.AppOrderService;
  12. import io.swagger.annotations.Api;
  13. import io.swagger.annotations.ApiOperation;
  14. import org.springframework.beans.factory.annotation.Autowired;
  15. import org.springframework.web.bind.annotation.*;
  16. import java.math.BigDecimal;
  17. @RestController
  18. @Api(value = "数据中心-管理端", tags = {"数据中心-管理端"})
  19. @RequestMapping(value = "/admin/dataCentre")
  20. public class DataCentreController {
  21. @Autowired
  22. private DataCentreService dataCentreService;
  23. @Autowired
  24. private AppOrderService appOrderService;
  25. @Autowired
  26. private TbCouponUserService tbCouponUserService;
  27. @Autowired
  28. private UserIntegralDetailsService userIntegralDetailsService;
  29. @Autowired
  30. private UserMoneyService userMoneyService;
  31. @Autowired
  32. private ErrandComplaintService errandComplaintService;
  33. @ApiOperation("数据中心")
  34. @GetMapping(value = "/dataCentre")
  35. public Result dataCentre() {
  36. return dataCentreService.dataCentre();
  37. }
  38. @ApiOperation("任务分析")
  39. @GetMapping(value = "selectOrderData")
  40. public Result selectOrderData(String date, String dateType) {
  41. return dataCentreService.selectOrderData(date, dateType);
  42. }
  43. @ApiOperation("任务详情分析")
  44. @GetMapping(value = "/selectOrderAnalyze")
  45. public Result selectPayOrderAnalyze(Integer page, Integer limit, String date, String dateType) {
  46. return dataCentreService.selectPayOrderAnalyze(page, limit, date, dateType);
  47. }
  48. @ApiOperation("条件筛选所有用户")
  49. @GetMapping(value = "selectAllUser")
  50. public Result selectAllUser(Integer page, Integer limit, String userName, String phone) {
  51. return dataCentreService.selectAllUser(page, limit, userName, phone);
  52. }
  53. @ApiOperation("根据userId查询")
  54. @GetMapping(value = "selectUserById")
  55. public Result selectUserById(Long userId) {
  56. return dataCentreService.selectUserById(userId);
  57. }
  58. @ApiOperation("给用户账户修改余额")
  59. @GetMapping(value = "addUserMoney")
  60. public Result addUserMoney(Long userId, BigDecimal money, Integer type) {
  61. return userMoneyService.addUserMoney(userId, money, type);
  62. }
  63. @ApiOperation("修改用户保证金")
  64. @GetMapping(value = "updateCashDeposit")
  65. public Result updateCashDeposit(Long userId, BigDecimal money, Integer type) {
  66. return userMoneyService.updateCashDeposit(userId, money, type);
  67. }
  68. @ApiOperation("给骑手修改余额")
  69. @GetMapping(value = "updateUserBalance")
  70. public Result updateUserBalance(Long userId, BigDecimal money, Integer type) {
  71. return userMoneyService.updateUserBalance(userId, money, type);
  72. }
  73. @ApiOperation("查看该用户下单信息(下单数、下单金额)")
  74. @GetMapping(value = "selectOrderByUserId")
  75. public Result selectOrderByUserId(Long userId, String date, String dateType) {
  76. return appOrderService.selectOrderByUserId(userId, date, dateType);
  77. }
  78. @ApiOperation("查看该用户下单详情")
  79. @GetMapping(value = "selectOrderDetails")
  80. public Result selectOrderDetails(Integer page, Integer limit, Long userId) {
  81. return appOrderService.selectOrderDetails(page, limit, userId);
  82. }
  83. @ApiOperation("查看用户拥有的优惠券")
  84. @GetMapping(value = "selectCouponByUserId")
  85. public Result selectCouponByUserId(Integer page, Integer limit, Long userId, Integer status, String phone,String shopName,Long shopId,Integer shopFlag/*是否平台券 1是 2否 0 全部 */) {
  86. return tbCouponUserService.selectCouponByUserId(page, limit, userId, status, phone,shopName,shopId,shopFlag);
  87. }
  88. @ApiOperation("查看积分明细")
  89. @GetMapping(value = "/selectSignIn")
  90. public Result selectSignIn(Integer page, Integer limit, Long userId) {
  91. return userIntegralDetailsService.selectSignIn(page, limit, userId);
  92. }
  93. @ApiOperation("财务中心-充值统计")
  94. @GetMapping(value = "selectTopUpStatistics")
  95. public Result selectTopUpStatistics(String date, String dateType) {
  96. return dataCentreService.selectTopUpStatistics(date, dateType);
  97. }
  98. @ApiOperation("查看所有实名认证待审核用户")
  99. @GetMapping(value = "findAllCertification")
  100. public Result findAllCertification(Integer page, Integer limit, String userName, String phone, String checkCertification) {
  101. return dataCentreService.findAllCertification(page, limit, userName, phone, checkCertification);
  102. }
  103. @ApiOperation("实名认证审核")
  104. @PostMapping("checkCertification")
  105. public Result checkCertification(Long userId, String checkCertification, String checkCertificationMessage) {
  106. return dataCentreService.checkCertification(userId, checkCertification, checkCertificationMessage);
  107. }
  108. @ApiOperation("查看用户实名认证信息")
  109. @GetMapping(value = "findCertification")
  110. public Result findCertification(Long userId) {
  111. return dataCentreService.findCertification(userId);
  112. }
  113. @ApiOperation("接单排行榜")
  114. @GetMapping(value = "rankingList")
  115. public Result rankingList(Integer page, Integer limit, String address, String date, String dateType) {
  116. return dataCentreService.rankingList(page, limit, address, date, dateType);
  117. }
  118. @ApiOperation("门店统计")
  119. @GetMapping(value = "selectShopCenter")
  120. public Result selectShopCenter(String date, String dateType, Integer page, Integer limit) {
  121. return dataCentreService.selectShopCenter(date, dateType, page, limit);
  122. }
  123. @ApiOperation("用户统计")
  124. @GetMapping(value = "selectUserCenter")
  125. public Result selectUserCenter(String date, String dateType) {
  126. return dataCentreService.selectUserCenter(date, dateType);
  127. }
  128. @GetMapping(value = "selectUserFeedback")
  129. @ApiOperation("查看意见反馈")
  130. public Result selectUserFeedback(String userEmail, Integer page, Integer limit) {
  131. return dataCentreService.selectUserFeedback(userEmail, page, limit);
  132. }
  133. @ApiOperation("获取该用户所有派单任务")
  134. @GetMapping(value = "findUserAddIndent")
  135. public Result findUserAddIndent(Long userId, Integer page, Integer limit) {
  136. return dataCentreService.findUserAddIndent(userId, page, limit);
  137. }
  138. @ApiOperation("获取该用户所有接单任务")
  139. @GetMapping(value = "findUserReceivingIndent")
  140. public Result findUserReceivingIndent(Long userId, Integer page, Integer limit) {
  141. return dataCentreService.findUserReceivingIndent(userId, page, limit);
  142. }
  143. @ApiOperation("查看充值明细")
  144. @GetMapping(value = "findTopUpMoney")
  145. public Result findTopUpMoney(Long userId, Integer page, Integer limit, String startTime, String endTime) {
  146. return dataCentreService.findTopUpMoney(userId, page, limit, startTime, endTime);
  147. }
  148. @ApiOperation("查看提现记录")
  149. @GetMapping(value = "findWithdrawMoney")
  150. public Result findWithdrawMoney(Long userId, Integer page, Integer limit) {
  151. return dataCentreService.findWithdrawMoney(userId, page, limit);
  152. }
  153. //查看全部骑手申诉(条件查询)
  154. @ApiOperation("查看全部骑手申诉")
  155. @GetMapping(value = "findAllAppeal")
  156. public Result findAllAppeal(Integer page, Integer limit, Long userId, Integer illegalId, Integer complaintState, String indentNumber) {
  157. return errandComplaintService.findAllAppeal(page, limit, userId, illegalId, complaintState, indentNumber);
  158. }
  159. @ApiOperation("同城跑腿收入统计")
  160. @GetMapping(value = "findplatformMoney")
  161. public Result findplatformMoney(String dateType, String date) {
  162. return dataCentreService.findplatformMoney(dateType, date);
  163. }
  164. @ApiOperation("外卖点餐收入统计")
  165. @GetMapping(value = "tcwmplatformMoney")
  166. private Result tcwmplatformMoney(String date, String dateType) {
  167. return dataCentreService.tcwmplatformMoney(date, dateType);
  168. }
  169. @ApiOperation("保证金管理")
  170. @GetMapping(value = "selectCashDeposit")
  171. public Result selectCashDeposit(String phone, Integer type, Integer page, Integer limit, Long userId) {
  172. return dataCentreService.selectCashDeposit(phone, type, page, limit, userId);
  173. }
  174. /* @ApiOperation("用户中心 用户列表")
  175. @GetMapping(value = "findAllUser")
  176. public Result findAllUser(Integer page, Integer limit, String phone, Integer userType, String platform, String nickName, String invitationCode){
  177. return dataCentreService.findAllUser(page, limit, phone, userType, platform, nickName, invitationCode);
  178. }*/
  179. @ApiOperation("查看反馈列表")
  180. @GetMapping(value = "selectFeedbackList")
  181. public Result selectFeedbackList(Integer page, Integer limit, Integer feedbackType) {
  182. return dataCentreService.selectFeedbackList(page, limit, feedbackType);
  183. }
  184. /*==========================================================*/
  185. @ApiOperation("管理端赠送用户会员")
  186. @PostMapping(value = "presenterVip")
  187. public Result presenterVip(Long userId) {
  188. return dataCentreService.presenterVip(userId);
  189. }
  190. }