From fe646416d8d46de7b896ddbf65a3ad0cd30b729b Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 15 七月 2020 16:05:56 +0800 Subject: [PATCH] 大淘客与好单库与主包剥离 --- fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java | 96 ++++++++++++++++++++++++++++++----------------- 1 files changed, 61 insertions(+), 35 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java index 26e9411..76c6795 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java @@ -10,6 +10,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import com.yeshi.fanli.entity.accept.AdminAcceptData; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.multipart.MultipartFile; @@ -59,8 +60,6 @@ @RequestMapping("admin/new/api/v1/order") public class OrderAdminController { - @Resource - private OrderService orderService; @Resource private HongBaoV2CountService hongBaoV2CountService; @@ -71,8 +70,6 @@ @Resource private CommonOrderService commonOrderService; - @Resource - private TaoBaoOrderService taoBaoOrderService; @Resource private TaoBaoOrderCountService taoBaoOrderCountService; @@ -96,9 +93,6 @@ private UserMoneyDebtService userMoneyDebtService; @Resource - private UserSystemCouponRecordService userSystemCouponRecordService; - - @Resource private ConfigService configService; @Resource @@ -115,7 +109,7 @@ * @param out */ @RequestMapping(value = "countTaoBaoOrder") - public void countTaoBaoOrder(String callback, HttpServletRequest request, PrintWriter out) { + public void countTaoBaoOrder(AdminAcceptData acceptData,String callback, HttpServletRequest request, PrintWriter out) { try { Map<String, Object> countByOdrerType = taoBaoOrderCountService.countByOdrerType(); @@ -145,19 +139,17 @@ * @param callback * @param pageIndex * @param pageSize - * @param uid * @param state * @param type * @param orderState - * @param orderNo * @param startTime * @param endTime * @param out */ @RequestMapping(value = "getUserOrderList") - public void getUserOrderList(String callback, Integer pageIndex, Integer pageSize, Integer keyType, String key, - Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer sourceType, - Integer riskType, BigDecimal payment, PrintWriter out) { + public void getUserOrderList(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, Integer keyType, String key, + Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer sourceType, + Integer riskType, BigDecimal payment, PrintWriter out) { if (pageIndex == null || pageIndex < 1) { pageIndex = 1; @@ -192,14 +184,14 @@ if (riskType == 1) { listGoodsId = commonOrderCountService.getSameGoodsOrderByUidAndHongBaoType(typeList, uid, - Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey()))); + Integer.parseInt(configService.getValue(ConfigKeyEnum.adminMinSameGoodsOrderCount.getKey(),acceptData.getSystem()))); if (listGoodsId == null || listGoodsId.isEmpty()) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鍚屽晢鍝佽鍗�")); return; } } else if (riskType == 2) { listShopId = commonOrderCountService.getSameShopOrderByUidAndHongBaoType(typeList, uid, - Integer.parseInt(configService.get(ConfigKeyEnum.adminMinSameShopOrderCount.getKey()))); + Integer.parseInt(configService.getValue(ConfigKeyEnum.adminMinSameShopOrderCount.getKey(),acceptData.getSystem()))); if (listShopId == null || listShopId.isEmpty()) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鍚屽簵閾鸿鍗�")); return; @@ -212,11 +204,11 @@ // 鏌ヨ鍒楄〃 List<CommonOrderVO> list = commonOrderService.listQuery((pageIndex - 1) * pageSize, pageSize, keyType, key, - state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money, payment); + state, type, orderState, startTime, endTime, sourceType, listShopId, listGoodsId, minTime, money, payment,acceptData.getSystem()); // 缁熻鎬绘暟 long count = commonOrderService.countQuery(keyType, key, state, type, orderState, startTime, endTime, - sourceType, listShopId, listGoodsId, minTime, money, payment); + sourceType, listShopId, listGoodsId, minTime, money, payment,acceptData.getSystem()); for (CommonOrderVO order : list) { @@ -341,7 +333,7 @@ * @param out */ @RequestMapping(value = "getHistoryOrder") - public void getHistoryOrder(String callback, Integer pageIndex, Integer pageSize, Long uid, Integer state, + public void getHistoryOrder(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, Long uid, Integer state, Integer type, Integer orderState, String orderNo, String startTime, String endTime, PrintWriter out) { if (uid == null) { @@ -408,7 +400,7 @@ * @param out */ @RequestMapping(value = "getHistoryUnreceived") - public void getHistoryUnreceived(String callback, Integer type, PrintWriter out) { + public void getHistoryUnreceived(AdminAcceptData acceptData,String callback, Integer type, PrintWriter out) { try { Long total = commonOrderCountService.countByState(1); @@ -426,7 +418,7 @@ @RequestMapping(value = "uploadTaoBaoWeiQuanOrder") - public void uploadWeiQuanOrder(String callback, HttpServletRequest request, PrintWriter out) { + public void uploadWeiQuanOrder(AdminAcceptData acceptData,String callback, HttpServletRequest request, PrintWriter out) { try { // 1. 鍏堝垽鏂環ttpRequest 鏄惁鍚湁鏂囦欢绫诲瀷 if (request instanceof MultipartHttpServletRequest) { @@ -446,22 +438,56 @@ @RequestMapping(value = "countOrderInfo") - public void countOrderInfo(String callback, Long uid, PrintWriter out) { - // 鑷喘宸插埌璐� - long selfNumEnd = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY, 1); - // 鍒嗕韩宸插埌璐� - long shareNumEnd = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY, 2); - - // 鑷喘鏈埌璐� - long selfNum = hongBaoV2CountService.countMyDirectOrderByCashNotArrival(uid, Constant.VIP_ORDER_PAY, 1); - // 鍒嗕韩鏈埌璐� - long shareNum = hongBaoV2CountService.countMyDirectOrderByCashNotArrival(uid, Constant.VIP_ORDER_PAY, 2); - + public void countOrderInfo(AdminAcceptData acceptData,String callback, Long uid, PrintWriter out) { JSONObject data = new JSONObject(); - data.put("selfNumEnd", selfNumEnd); - data.put("shareNumEnd", shareNumEnd); - data.put("selfNum", selfNum); - data.put("shareNum", shareNum); + + /* --------- 鏈湀绱 ------------*/ + JSONObject month = new JSONObject(); + // 鑷喘宸插埌璐� + month.put("selfNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 1, 1)); + // 鍒嗕韩宸插埌璐� + month.put("shareNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 2, 1)); + // 閭�璇峰凡鍒拌处 + month.put("inviteNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 3, 1)); + // 鑷喘鏈埌璐� + month.put("selfNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 1, 1)); + // 鍒嗕韩鏈埌璐� + month.put("shareNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 2, 1)); + // 閭�璇锋湭鍒拌处 + month.put("inviteNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 3, 1)); + data.put("month", month); + + + /* --------- 鍘嗗彶绱 ------------*/ + JSONObject history = new JSONObject(); + // 鑷喘宸插埌璐� + history.put("selfNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 1, null)); + // 鍒嗕韩宸插埌璐� + history.put("shareNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 2, null)); + // 閭�璇峰凡鍒拌处 + history.put("inviteNumEnd", hongBaoV2CountService.countOrderByCashArrival(uid, null, 3, null)); + // 鑷喘鏈埌璐� + history.put("selfNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 1, null)); + // 鍒嗕韩鏈埌璐� + history.put("shareNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 2, null)); + // 閭�璇锋湭鍒拌处 + history.put("inviteNum", hongBaoV2CountService.countOrderByCashNotArrival(uid, null, 3, null)); + data.put("history", history); + + + /* --------- 浠樻閲戦澶т簬1 ------------*/ + // 鑷喘宸插埌璐� + long selfAccountEnd = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY, 1); + // 鍒嗕韩宸插埌璐� + long shareAccountEnd = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY, 2); + // 鑷喘鏈埌璐� + long selfAccount = hongBaoV2CountService.countOrderByCashNotArrival(uid, Constant.VIP_ORDER_PAY, 1, null); + // 鍒嗕韩鏈埌璐� + long shareAccount = hongBaoV2CountService.countOrderByCashNotArrival(uid, Constant.VIP_ORDER_PAY, 2, null); + data.put("selfAccountEnd", selfAccountEnd); + data.put("shareAccountEnd", shareAccountEnd); + data.put("selfAccount", selfAccount); + data.put("shareAccount", shareAccount); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); } -- Gitblit v1.8.0