5 Commits 5746872409 ... 9f04475c30

Author SHA1 Message Date
  ‘linchangsheng’ 9f04475c30 ES 3 days ago
  ‘linchangsheng’ 7ff1d20857 Merge branch 'master' into develop-FB 3 days ago
  ‘linchangsheng’ 067a4e7767 ES 3 days ago
  FengChaoYu b17c4af7be Merge remote-tracking branch 'origin/master' 4 days ago
  FengChaoYu 1627e88114 no message 4 days ago
37 changed files with 475 additions and 3674 deletions
  1. 1 0
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java
  2. 3 1
      mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java
  3. 6 4
      mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/ESOrderBaseController.java
  4. 18 13
      mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/OrderBaseController.java
  5. 6 2
      mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/OrderBaseCountController.java
  6. 41 14
      mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseCountLogic.java
  7. 228 55
      mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseEsLogic.java
  8. 91 15
      mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseLogic.java
  9. 33 10
      mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderFlagLogic.java
  10. 47 1
      mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderLogLogic.java
  11. 1 1
      mall-server-api/src/main/resources/mapper/CommonMapper.xml
  12. 0 142
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/CarouselMapController.java
  13. 0 125
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/FreightController.java
  14. 0 115
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/StorageController.java
  15. 0 71
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyPayConfigController.java
  16. 0 48
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatOtherController.java
  17. 0 61
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatTemplateController.java
  18. 0 160
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminDeptController.java
  19. 0 56
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminModuleController.java
  20. 0 85
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminRoleController.java
  21. 0 271
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminUserController.java
  22. 0 60
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/OperationLogController.java
  23. 0 66
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWithUserController.java
  24. 0 161
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWorkerController.java
  25. 0 203
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/ChargingStandardController.java
  26. 0 159
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CompanyRecordController.java
  27. 0 115
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CryptTool.java
  28. 0 609
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/GreeLogic.java
  29. 0 52
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/LbsAmapController.java
  30. 0 152
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/OpenDictController.java
  31. 0 50
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/RedirectController.java
  32. 0 191
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/SysDictCompanyController.java
  33. 0 258
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/WechatController.java
  34. 0 53
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/sync/SyncController.java
  35. 0 93
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/wxCustomer/WeCallBackController.java
  36. 0 59
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/wxCustomer/WxCustomerController.java
  37. 0 143
      mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/zfire/ZfireController.java

+ 1 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

@@ -365,6 +365,7 @@ public class WorkerLogic {
                 .notIn(CollectionUtil.isNotEmpty(policyIds), Policy::getId, policyIds)
                 .gt(endTime != null, Policy::getEndTime,endTime)
                 .eq(Policy::getIsBuy, IsYesNoEnum.YES.getKey())
+                .eq(Policy::getType, "AC")
                 .le(Policy::getPolicyStartTime, new Date())
                 .ge(Policy::getEndTime, new Date())
                 .orderByAsc(Policy::getEndTime)

+ 3 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -229,7 +229,9 @@ public interface CommonMapper {
                                             @Param("ex") WorkOrderZfireParam zfireParamBean,
                                             @Param("adminUserType") Integer adminUserType
             ,@Param("companyWechatId") String companyWechatId,
-            @Param("orderBaseId") List<String> orderBaseId
+            @Param("orderBaseId") List<String> orderBaseId,
+            @Param("sqlBase") String sqlBase
+
                                             );
 
     /**

+ 6 - 4
mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/ESOrderBaseController.java

@@ -75,12 +75,13 @@ public class ESOrderBaseController {
 
     @PostMapping("/list/export")
     @ApiOperation(value = "导出")
-    public synchronized void listExport(@RequestBody WorkOrderZfireParam zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public synchronized void listExport(@RequestBody WorkOrderZfireParam zfireParamBean,
+                                        HttpServletRequest request, HttpServletResponse response) throws Exception {
         //1.组装查询条件
         ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
         //2.查询要导出的内容
 
-        List<OrderBaseVO> orderBaseVOIPage = orderBaseEsLogic.listExport(zfireParamBean);
+        List<OrderBaseVO> orderBaseVOIPage = orderBaseEsLogic.listExport(zfireParamBean,request);
 
         //3.导出
         FieldUtils.exportData(orderBaseVOIPage, zfireParam.getExportFields(), request, response);
@@ -92,9 +93,10 @@ public class ESOrderBaseController {
             @RequestParam(required = false) String startTime,
             @RequestParam(required = false) String endTime,
             @RequestParam(required = false) String orderSmallType,
-            @RequestParam(required = false) String orderSmallTypeText
+            @RequestParam(required = false) String orderSmallTypeText,
+            HttpServletRequest request
     ) {
-        List<Map<String, Object>> maps = orderBaseEsLogic.countStatus(startTime,endTime,orderSmallType,orderSmallTypeText);
+        List<Map<String, Object>> maps = orderBaseEsLogic.countStatus(startTime,endTime,orderSmallType,orderSmallTypeText,request);
         return ResponseHelper.success(maps);
     }
 

+ 18 - 13
mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/OrderBaseController.java

@@ -27,6 +27,7 @@ import com.gree.mall.manager.plus.entity.PgOrderBase;
 import com.gree.mall.manager.plus.entity.PgOrderOperatorLog;
 import com.gree.mall.manager.plus.entity.PgOrderProduct;
 import com.gree.mall.manager.plus.entity.PgOrderWorker;
+import com.gree.mall.manager.utils.CommonUtils;
 import com.gree.mall.manager.utils.excel.ExcelUtils;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
@@ -67,9 +68,10 @@ public class OrderBaseController {
     @PostMapping("/list")
     @ApiOperation(value = "列表")
     public ResponseHelper<Page<OrderBaseVO>> list(
-            @RequestBody WorkOrderZfireParam workOrderZfireParam
+            @RequestBody WorkOrderZfireParam workOrderZfireParam,
+            HttpServletRequest request
     ) {
-        IPage<OrderBaseVO> orderBaseVOIPage = orderBaseLogic.orderBaseList(workOrderZfireParam);
+        IPage<OrderBaseVO> orderBaseVOIPage = orderBaseLogic.orderBaseList(workOrderZfireParam,request);
         return ResponseHelper.success(orderBaseVOIPage, new TypeReference<OrderBaseVO>() {});
     }
 
@@ -80,7 +82,7 @@ public class OrderBaseController {
         ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
         zfireParam.setPageSize(10000);
         //2.查询要导出的内容
-        IPage<OrderBaseVO> page = orderBaseLogic.orderBaseList(zfireParamBean);
+        IPage<OrderBaseVO> page = orderBaseLogic.orderBaseList(zfireParamBean,request);
         //3.导出
         FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
     }
@@ -104,9 +106,10 @@ public class OrderBaseController {
             @RequestParam(required = false) String startTime,
             @RequestParam(required = false) String endTime,
             @RequestParam(required = false) String orderSmallType,
-            @RequestParam(required = false) String orderSmallTypeText
+            @RequestParam(required = false) String orderSmallTypeText,
+            HttpServletRequest request
     ) {
-        List<Map<String, Object>> maps = orderBaseEsLogic.countStatus(startTime,endTime,orderSmallType,orderSmallTypeText);
+        List<Map<String, Object>> maps = orderBaseEsLogic.countStatus(startTime,endTime,orderSmallType,orderSmallTypeText,request);
        // List<Map<String, Object>> maps = orderBaseLogic.countStatus(startTime,endTime,orderSmallType,orderSmallTypeText);
         return ResponseHelper.success(maps);
     }
@@ -241,23 +244,24 @@ public class OrderBaseController {
 
     @PostMapping("/detail")
     @ApiOperation(value = "工单-详情")
-    public ResponseHelper<OrderAddBeanDTO> detail(@RequestParam String orderBaseId){
-        OrderAddBeanDTO detail = orderBaseLogic.detail(orderBaseId);
+    public ResponseHelper<OrderAddBeanDTO> detail(@RequestParam String orderBaseId, HttpServletRequest request){
+        OrderAddBeanDTO detail = orderBaseLogic.detail(orderBaseId,request);
         return ResponseHelper.success(detail);
     }
 
     @PostMapping("/worker/list")
     @ApiOperation(value = "工单师傅-列表")
-    public ResponseHelper<List<PgOrderWorker>> workerList(@RequestParam String orderBaseId){
-        List<PgOrderWorker> orderWorkers = orderBaseLogic.orderWorkerList(orderBaseId);
+    public ResponseHelper<List<PgOrderWorker>> workerList(@RequestParam String orderBaseId,HttpServletRequest request){
+        String year = CommonUtils.getYear(request);
+        List<PgOrderWorker> orderWorkers = orderBaseLogic.orderWorkerList(orderBaseId,year);
         return ResponseHelper.success(orderWorkers);
     }
 
 
     @PostMapping("/product/list")
     @ApiOperation(value = "服务单-工单机型列表")
-    public ResponseHelper<List<PgOrderProduct>> productList(@RequestParam String orderBaseId) {
-        List<PgOrderProduct> orderProducts = orderBaseLogic.listOrderProduct(orderBaseId);
+    public ResponseHelper<List<PgOrderProduct>> productList(@RequestParam String orderBaseId,HttpServletRequest request) {
+        List<PgOrderProduct> orderProducts = orderBaseLogic.listOrderProduct(orderBaseId,request);
         return ResponseHelper.success(orderProducts);
     }
 
@@ -308,9 +312,10 @@ public class OrderBaseController {
     @PostMapping("/log/list")
     @ApiOperation(value = "工单操作明细-列表")
     public ResponseHelper<List<PgOrderOperatorLog>> orderOperatorLog(
-            @RequestParam String orderBaseId
+            @RequestParam String orderBaseId,
+            HttpServletRequest request
     ) {
-        List<PgOrderOperatorLog> pgOrderOperatorLogs = orderLogLogic.operatorLogList(orderBaseId);
+        List<PgOrderOperatorLog> pgOrderOperatorLogs = orderLogLogic.operatorLogList(orderBaseId,request);
         return ResponseHelper.success(pgOrderOperatorLogs);
     }
 

+ 6 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/OrderBaseCountController.java

@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
+
 @RequiredArgsConstructor
 @Slf4j
 @RestController
@@ -25,8 +27,10 @@ public class OrderBaseCountController {
     @PostMapping("/status/count")
     @ApiOperation(value = "按工单状态统计")
     public ResponseHelper<OrderBaseCountBean> countStatus(   @RequestParam(required = false) String startTime,
-                                                             @RequestParam(required = false) String endTime) {
-        OrderBaseCountBean orderBaseCountBean = orderBaseCountLogic.baseCountBean(startTime,endTime);
+                                                             @RequestParam(required = false) String endTime,
+                                                             HttpServletRequest request
+                                                             ) {
+        OrderBaseCountBean orderBaseCountBean = orderBaseCountLogic.baseCountBean(startTime,endTime,request);
         return ResponseHelper.success(orderBaseCountBean);
     }
 

+ 41 - 14
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseCountLogic.java

@@ -4,6 +4,9 @@ import cn.hutool.core.convert.Convert;
 import cn.hutool.core.date.DateUtil;
 import com.google.common.collect.Lists;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
+import com.gree.mall.manager.bean.es.OrderBase2022Es;
+import com.gree.mall.manager.bean.es.OrderBase2023Es;
+import com.gree.mall.manager.bean.es.OrderBase2024Es;
 import com.gree.mall.manager.bean.es.OrderBaseEs;
 import com.gree.mall.manager.bean.workorder.OrderBaseCountBean;
 import com.gree.mall.manager.bean.workorder.OrderCount7DayBean;
@@ -14,6 +17,7 @@ import com.gree.mall.manager.enums.workorder.OrderTypeEnum;
 import com.gree.mall.manager.logic.common.CommonLogic;
 import com.gree.mall.manager.plus.entity.PgOrderBase;
 import com.gree.mall.manager.plus.service.PgOrderBaseService;
+import com.gree.mall.manager.utils.CommonUtils;
 import io.swagger.models.auth.In;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -40,6 +44,7 @@ import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilde
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestParam;
 
+import javax.servlet.http.HttpServletRequest;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.ZoneOffset;
@@ -61,8 +66,10 @@ public class OrderBaseCountLogic {
      * @return
      */
     public OrderBaseCountBean baseCountBean( String startTime,
-                                             String endTime){
+                                             String endTime,
+                                             HttpServletRequest request){
         AdminUserCom adminUser = commonLogic.getAdminUser();
+        String year = CommonUtils.getYear(request);
         OrderBaseCountBean orderBaseCountBean = new OrderBaseCountBean();
         BoolQueryBuilder queryBuilderCount = QueryBuilders.boolQuery();
 
@@ -88,7 +95,7 @@ public class OrderBaseCountLogic {
                         .must(QueryBuilders.termsQuery("order_status","DSHPG","CJ","YPD","DXSPD","DZBPG","DWDSPGP","DXSSPGP","DTJXSSPGP","DZBSPGP","DFZXPD","DFZXSPGP","DWDPG","DWDPD")
                 ))))
                 .build();
-        SearchHits responseDPG = elasticsearchRestTemplate.search(searchQueryDPG, OrderBaseEs.class);
+        SearchHits responseDPG = this.search(searchQueryDPG,year);
 
         orderBaseCountBean.setDpg(Convert.toInt(this.getWorkerOrderCountResult(responseDPG.getAggregations(),"DPG")));
 
@@ -103,7 +110,7 @@ public class OrderBaseCountLogic {
                         .mustNot(QueryBuilders.termsQuery("order_status", "YQX", "FWQX", "FL", "FWZT", "YCGB","YZP"))
                 )))
                 .build();
-        SearchHits responseDJS = elasticsearchRestTemplate.search(searchQueryDJS, OrderBaseEs.class);
+        SearchHits responseDJS = this.search(searchQueryDJS,year);
 
         orderBaseCountBean.setDjs(Convert.toInt(this.getWorkerOrderCountResult(responseDJS.getAggregations(),"DJS")));
 
@@ -116,7 +123,7 @@ public class OrderBaseCountLogic {
                         .must(QueryBuilders.termsQuery("order_status","DQD")
                         ))))
                 .build();
-        SearchHits responseDQD = elasticsearchRestTemplate.search(searchQueryDQD, OrderBaseEs.class);
+        SearchHits responseDQD = this.search(searchQueryDQD,year);
 
         orderBaseCountBean.setDqd(Convert.toInt(this.getWorkerOrderCountResult(responseDQD.getAggregations(),"DQD")));
 
@@ -129,7 +136,7 @@ public class OrderBaseCountLogic {
                         .must(QueryBuilders.termsQuery("order_status","FWZ","GCSZT","BFWG","DSM","WDBH","XSBH","TJXSBH","ZBBH","FZXBH")
                         ))))
                 .build();
-        SearchHits responsefwz = elasticsearchRestTemplate.search(searchQueryfwz, OrderBaseEs.class);
+        SearchHits responsefwz = this.search(searchQueryfwz,year);
 
         orderBaseCountBean.setFwz(Convert.toInt(this.getWorkerOrderCountResult(responsefwz.getAggregations(),"fwz")));
 
@@ -145,7 +152,7 @@ public class OrderBaseCountLogic {
                         .mustNot(QueryBuilders.existsQuery("appointment_time"))
                 )))
                 .build();
-        SearchHits responseDYY = elasticsearchRestTemplate.search(searchQueryDYY, OrderBaseEs.class);
+        SearchHits responseDYY = this.search(searchQueryDYY,year);
 
         orderBaseCountBean.setDyy(Convert.toInt(this.getWorkerOrderCountResult(responseDYY.getAggregations(),"DYY")));
 
@@ -159,7 +166,7 @@ public class OrderBaseCountLogic {
 
                 )))
                 .build();
-        SearchHits responseYCDCL = elasticsearchRestTemplate.search(searchQueryYCDCL, OrderBaseEs.class);
+        SearchHits responseYCDCL = this.search(searchQueryYCDCL,year);
 
         orderBaseCountBean.setYcdcl(Convert.toInt(this.getWorkerOrderCountResult(responseYCDCL.getAggregations(),"YCDCL")));
 
@@ -173,7 +180,7 @@ public class OrderBaseCountLogic {
 
                 )))
                 .build();
-        SearchHits responseCP = elasticsearchRestTemplate.search(searchQueryCP, OrderBaseEs.class);
+        SearchHits responseCP = this.search(searchQueryCP,year);
 
         orderBaseCountBean.setCp(Convert.toInt(this.getWorkerOrderCountResult(responseCP.getAggregations(),"CP")));
 
@@ -228,7 +235,7 @@ public class OrderBaseCountLogic {
 
 
         // 执行查询并获取聚合结果
-        SearchHits<OrderBaseEs> searchHitsXZGD = elasticsearchRestTemplate.search(searchQueryDay, OrderBaseEs.class);
+        SearchHits<OrderBaseEs> searchHitsXZGD = this.search(searchQueryDay,year);
 
         var aggregationsXZGD = searchHitsXZGD.getAggregations();
 
@@ -273,7 +280,7 @@ public class OrderBaseCountLogic {
 
 
         // 执行查询并获取聚合结果
-        SearchHits<OrderBaseEs> searchHitsXWGD = elasticsearchRestTemplate.search(searchQueryWGD, OrderBaseEs.class);
+        SearchHits<OrderBaseEs> searchHitsXWGD = this.search(searchQueryWGD,year);
 
         var aggregationsWGD = searchHitsXWGD.getAggregations();
 
@@ -317,7 +324,7 @@ public class OrderBaseCountLogic {
 
 
         // 执行查询并获取聚合结果
-        SearchHits<OrderBaseEs> searchHitsJXZ= elasticsearchRestTemplate.search(searchQueryJXZ, OrderBaseEs.class);
+        SearchHits<OrderBaseEs> searchHitsJXZ= this.search(searchQueryJXZ,year);
 
         var aggregationsJXZ = searchHitsJXZ.getAggregations();
 
@@ -363,7 +370,7 @@ public class OrderBaseCountLogic {
                         .calendarInterval(DateHistogramInterval.DAY)
                         .format("yyyy-MM-dd"))
                 .build();
-        SearchHits responseQTSM = elasticsearchRestTemplate.search(searchQueryQTSM, OrderBaseEs.class);
+        SearchHits responseQTSM = this.search(searchQueryQTSM,year);
 
         var aggregationsQTSM = responseQTSM.getAggregations();
 
@@ -417,7 +424,7 @@ public class OrderBaseCountLogic {
                         .calendarInterval(DateHistogramInterval.DAY)
                         .format("yyyy-MM-dd"))
                 .build();
-        SearchHits responseAZ = elasticsearchRestTemplate.search(searchQueryAZ, OrderBaseEs.class);
+        SearchHits responseAZ = this.search(searchQueryAZ,year);
 
         var aggregationsAZ = responseAZ.getAggregations();
 
@@ -458,7 +465,7 @@ public class OrderBaseCountLogic {
                         .calendarInterval(DateHistogramInterval.DAY)
                         .format("yyyy-MM-dd"))
                 .build();
-        SearchHits responseWX = elasticsearchRestTemplate.search(searchQueryWX, OrderBaseEs.class);
+        SearchHits responseWX = this.search(searchQueryWX,year);
 
         var aggregationsWX = responseWX.getAggregations();
 
@@ -482,6 +489,26 @@ public class OrderBaseCountLogic {
         return orderBaseCountBean;
     }
 
+    private SearchHits search(NativeSearchQuery searchQuery,String year) {
+
+        if (year.equals("2023")) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2023Es.class);
+            return response;
+        }
+        if (year.equals("2024")) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2024Es.class);
+            return response;
+        }
+
+        if (year.equals("2022") || Convert.toInt(year) < 2022) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2022Es.class);
+            return response;
+        }else {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBaseEs.class);
+            return response;
+        }
+    }
+
 
     public AbstractAggregationBuilder<?> getAggs(FilterAggregationBuilder filter) {
         return filter.subAggregation(AggregationBuilders.sum("total_mac_sum").field("total_num"))

+ 228 - 55
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseEsLogic.java

@@ -194,7 +194,7 @@ public class OrderBaseEsLogic {
                     .stream()
                     .map(OrderBaseVO::getId)
                     .collect(Collectors.toList());
-            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds);
+            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds,year);
 
             List<WorkerOrder> workerOrderList = workerOrderService.lambdaQuery().in(WorkerOrder::getWorkerOrderId, orderBaseIds)
                     .eq(WorkerOrder::getPayStatus, MaterialExamineStatusEnum.PAID.getKey())
@@ -407,8 +407,10 @@ public class OrderBaseEsLogic {
         }*/
     }
 
-    public List<Map<String, Object>> countStatus(String startTime, String endTime, String orderSmallType, String orderSmallTypeText) {
+    public List<Map<String, Object>> countStatus(String startTime, String endTime, String orderSmallType, String orderSmallTypeText,HttpServletRequest request) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
+
+        String year = CommonUtils.getYear(request);
         BoolQueryBuilder queryBuilder = QueryBuilders.boolQuery();
 
         List<Map<String, Object>> maps = new ArrayList<>();
@@ -443,15 +445,15 @@ public class OrderBaseEsLogic {
                                 .lte(endTime)
                         ))))
                 .build();
-        SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBaseEs.class);
 
+        SearchHits response = this.search(searchQuery,year);
         HashMap<String, Object> dyy = new HashMap<>();
-        dyy.put("total",this.getWorkerOrderCountResult(response.getAggregations(),"DYY"));
-        dyy.put("orderStatus","DYY");
-
+        dyy.put("total", this.getWorkerOrderCountResult(response.getAggregations(), "DYY"));
+        dyy.put("orderStatus", "DYY");
         maps.add(dyy);
 
 
+
         //待抢单
         NativeSearchQuery searchQueryDqd = new NativeSearchQueryBuilder()
                 .withQuery(queryBuilder)
@@ -459,12 +461,12 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("DQD", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termQuery("order_status","DQD")))))
                 .build();
-        SearchHits responsedqd = elasticsearchRestTemplate.search(searchQueryDqd, OrderBaseEs.class);
+
+        SearchHits responsedqd = this.search(searchQueryDqd,year);
 
         HashMap<String, Object> dqd = new HashMap<>();
         dqd.put("total",this.getWorkerOrderCountResult(responsedqd.getAggregations(),"DQD"));
         dqd.put("orderStatus","DQD");
-
         maps.add(dqd);
 
 
@@ -476,7 +478,7 @@ public class OrderBaseEsLogic {
                         .must(QueryBuilders.termsQuery("order_status","DSHPG","CJ","YPD","DXSPD","DZBPG","DWDSPGP","DXSSPGP",
                                 "DTJXSSPGP","DZBSPGP","DFZXPD","DFZXSPGP")))))
                 .build();
-        SearchHits responseDshpg = elasticsearchRestTemplate.search(searchQueryDshpg, OrderBaseEs.class);
+        SearchHits responseDshpg =this.search(searchQueryDshpg,year);
 
         HashMap<String, Object> dshpg = new HashMap<>();
         dshpg.put("total",this.getWorkerOrderCountResult(responseDshpg.getAggregations(),"DSHPG"));
@@ -492,7 +494,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("DWDPG", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termsQuery("order_status","DWDPG","DWDPD")))))
                 .build();
-        SearchHits responseDwdpg = elasticsearchRestTemplate.search(searchQueryDwdpg, OrderBaseEs.class);
+        SearchHits responseDwdpg = this.search(searchQueryDwdpg,year);
 
         HashMap<String, Object> DWDPG = new HashMap<>();
         DWDPG.put("total",this.getWorkerOrderCountResult(responseDwdpg.getAggregations(),"DWDPG"));
@@ -510,7 +512,7 @@ public class OrderBaseEsLogic {
                         .should(QueryBuilders.termsQuery("order_status", "DJD")))
                         )))
                 .build();
-        SearchHits responseDJD = elasticsearchRestTemplate.search(searchQueryDJD, OrderBaseEs.class);
+        SearchHits responseDJD = this.search(searchQueryDJD,year);
 
         HashMap<String, Object> DJD = new HashMap<>();
         DJD.put("total",this.getWorkerOrderCountResult(responseDJD.getAggregations(),"DJD"));
@@ -526,7 +528,7 @@ public class OrderBaseEsLogic {
                         .must(QueryBuilders.termsQuery("order_status","FWZ","GCSZT","BFWG",
                                 "DSM","WDBH", "XSBH","TJXSBH","ZBBH","FZXBH")))))
                 .build();
-        SearchHits responseFWZ = elasticsearchRestTemplate.search(searchQueryfwz, OrderBaseEs.class);
+        SearchHits responseFWZ = this.search(searchQueryfwz,year);
 
         HashMap<String, Object> FWZ = new HashMap<>();
         FWZ.put("total",this.getWorkerOrderCountResult(responseFWZ.getAggregations(),"FWZ"));
@@ -543,7 +545,7 @@ public class OrderBaseEsLogic {
                         .must(QueryBuilders.termQuery("is_exception",true))
                         .mustNot(QueryBuilders.termsQuery("order_status", "YWG", "YWGO", "YJS")))))
                 .build();
-        SearchHits responseYCD = elasticsearchRestTemplate.search(searchQueryYCD, OrderBaseEs.class);
+        SearchHits responseYCD = this.search(searchQueryYCD,year);
 
         HashMap<String, Object> YCD = new HashMap<>();
         YCD.put("total",this.getWorkerOrderCountResult(responseYCD.getAggregations(),"YCD"));
@@ -558,7 +560,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("YWG", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termsQuery("order_status","YWG","GCSZX","WDWG","YWGO")))))
                 .build();
-        SearchHits responseYWG = elasticsearchRestTemplate.search(searchQueryYWGDJS, OrderBaseEs.class);
+        SearchHits responseYWG = this.search(searchQueryYWGDJS,year);
 
         HashMap<String, Object> YWG = new HashMap<>();
         YWG.put("total",this.getWorkerOrderCountResult(responseYWG.getAggregations(),"YWG"));
@@ -574,7 +576,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("YJS", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termsQuery("order_status","YJS","LRCD")))))
                 .build();
-        SearchHits responseYJS = elasticsearchRestTemplate.search(searchQueryYJS, OrderBaseEs.class);
+        SearchHits responseYJS = this.search(searchQueryYJS,year);
 
         HashMap<String, Object> YJS = new HashMap<>();
         YJS.put("total",this.getWorkerOrderCountResult(responseYJS.getAggregations(),"YJS"));
@@ -589,7 +591,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("YQX", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termsQuery("order_status","YZP","YQX","FWZT","YCGB","FWQX","FL")))))
                 .build();
-        SearchHits responseYQX = elasticsearchRestTemplate.search(searchQueryYQX, OrderBaseEs.class);
+        SearchHits responseYQX = this.search(searchQueryYQX,year);
 
         HashMap<String, Object> YQX = new HashMap<>();
         YQX.put("total",this.getWorkerOrderCountResult(responseYQX.getAggregations(),"YQX"));
@@ -605,7 +607,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("PJSQZ", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termQuery("parts_apply_status","ING")))))
                 .build();
-        SearchHits responsePJSQZ = elasticsearchRestTemplate.search(searchQueryPJSQZ, OrderBaseEs.class);
+        SearchHits responsePJSQZ = this.search(searchQueryPJSQZ,year);
 
         HashMap<String, Object> PJSQZ = new HashMap<>();
         PJSQZ.put("total",this.getWorkerOrderCountResult(responsePJSQZ.getAggregations(),"PJSQZ"));
@@ -621,7 +623,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("PJYDH", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termQuery("parts_apply_status","END")))))
                 .build();
-        SearchHits responsePJYDH = elasticsearchRestTemplate.search(searchQueryPJYDH, OrderBaseEs.class);
+        SearchHits responsePJYDH =  this.search(searchQueryPJYDH,year);
 
         HashMap<String, Object> PJYDH = new HashMap<>();
         PJYDH.put("total",this.getWorkerOrderCountResult(responsePJYDH.getAggregations(),"PJYDH"));
@@ -637,7 +639,7 @@ public class OrderBaseEsLogic {
                 .addAggregation(this.getAggs(AggregationBuilders.filter("PJYQX", QueryBuilders.boolQuery()
                         .must(QueryBuilders.termQuery("parts_apply_status","CANCEL")))))
                 .build();
-        SearchHits responsePJYQX = elasticsearchRestTemplate.search(searchQueryPJYQX, OrderBaseEs.class);
+        SearchHits responsePJYQX = this.search(searchQueryPJYQX,year);
 
         HashMap<String, Object> PJYQX = new HashMap<>();
         PJYQX.put("total",this.getWorkerOrderCountResult(responsePJYQX.getAggregations(),"PJYQX"));
@@ -664,7 +666,7 @@ public class OrderBaseEsLogic {
                             .must(QueryBuilders.termsQuery("id",orderBaseId))
                     )))
                     .build();
-            SearchHits responseDZF = elasticsearchRestTemplate.search(searchQueryDZF, OrderBaseEs.class);
+            SearchHits responseDZF = this.search(searchQueryDZF,year);
             DZF.put("total",this.getWorkerOrderCountResult(responseDZF.getAggregations(),"DZF"));
             DZF.put("orderStatus","DZF");
 
@@ -675,6 +677,27 @@ public class OrderBaseEsLogic {
         return maps;
     }
 
+
+    private SearchHits search(NativeSearchQuery searchQuery,String year) {
+
+        if (year.equals("2023")) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2023Es.class);
+             return response;
+        }
+        if (year.equals("2024")) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2024Es.class);
+            return response;
+        }
+
+        if (year.equals("2022") || Convert.toInt(year) < 2022) {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBase2022Es.class);
+            return response;
+        }else {
+            SearchHits response = elasticsearchRestTemplate.search(searchQuery, OrderBaseEs.class);
+            return response;
+        }
+    }
+
     public AbstractAggregationBuilder<?> getAggs(FilterAggregationBuilder filter) {
         return filter.subAggregation(AggregationBuilders.sum("total_mac_sum").field("total_num"))
                 .subAggregation(AggregationBuilders.terms("order_type_group").field("order_type")
@@ -727,10 +750,12 @@ public class OrderBaseEsLogic {
         orderWorkerEsRepository.saveAll(pgOrderWorkerEs);
     }
 
-    public List<OrderBaseVO> listExport(WorkOrderZfireParam zfireParamBean) {
+    public List<OrderBaseVO> listExport(WorkOrderZfireParam zfireParamBean,HttpServletRequest request) {
 
         AdminUserCom adminUser = commonLogic.getAdminUser();
 
+        String year = CommonUtils.getYear(request);
+
         BoolQueryBuilder queryBuilder1 = QueryBuilders.boolQuery();
         this.montage(queryBuilder1,zfireParamBean);
 
@@ -774,51 +799,199 @@ public class OrderBaseEsLogic {
 
 
         // 2. 初始化 Scroll
-        SearchScrollHits<OrderBaseEs> scrollHits = elasticsearchRestTemplate.searchScrollStart(
-                60000, // Scroll 上下文保持时间(毫秒)
-                query,
-                OrderBaseEs.class,
-                IndexCoordinates.of("pg_order_base")
-        );
 
-        String scrollId = scrollHits.getScrollId();
-        int batch = 0;
+        List<OrderBaseVO> orderBaseVOS1 = new ArrayList<>();
 
-        if (scrollHits.getTotalHits() > 60000)
-            throw  new RemoteServiceException("数据超过六万上限,请分批导出");
+        if (year.equals("2023")) {
+
+            List<OrderBase2023Es> orderBaseVOS = new ArrayList<>();
+            SearchScrollHits<OrderBase2023Es> scrollHits = elasticsearchRestTemplate.searchScrollStart(
+                    60000, // Scroll 上下文保持时间(毫秒)
+                    query,
+                    OrderBase2023Es.class,
+                    IndexCoordinates.of("pg_order_base_2023")
+            );
 
-        List<OrderBaseEs> orderBaseVOS = new ArrayList<>();
+            String scrollId = scrollHits.getScrollId();
+            int batch = 0;
 
-        try {
-            while (!scrollHits.isEmpty()) {
-                // 3. 处理当前批次数据
-                scrollHits.forEach(hit -> {
-                    OrderBaseEs entity = hit.getContent();
-                    orderBaseVOS.add(entity);
-                });
+            if (scrollHits.getTotalHits() > 60000)
+                throw  new RemoteServiceException("数据超过六万上限,请分批导出");
 
-                batch++;
 
-                // 4. 获取下一批次
-                scrollHits = elasticsearchRestTemplate.searchScrollContinue(
-                        scrollId,
-                        60000,
-                        OrderBaseEs.class,
-                        IndexCoordinates.of("pg_order_base")
-                );
-                scrollId = scrollHits.getScrollId(); // 更新 scrollId
+            try {
+                while (!scrollHits.isEmpty()) {
+                    // 3. 处理当前批次数据
+                    scrollHits.forEach(hit -> {
+                        OrderBase2023Es entity = hit.getContent();
+                        orderBaseVOS.add(entity);
+                    });
+
+                    batch++;
+
+                    // 4. 获取下一批次
+                    scrollHits = elasticsearchRestTemplate.searchScrollContinue(
+                            scrollId,
+                            60000,
+                            OrderBase2023Es.class,
+                            IndexCoordinates.of("pg_order_base_2023")
+                    );
+                    scrollId = scrollHits.getScrollId(); // 更新 scrollId
+                }
+            } finally {
+                // 5. 清理 Scroll 上下文
+                if (scrollId != null) {
+                    List<String> scroll = new ArrayList<>();
+                    scroll.add(scrollId);
+                    elasticsearchRestTemplate.searchScrollClear(scroll);
+                }
             }
-        } finally {
-            // 5. 清理 Scroll 上下文
-            if (scrollId != null) {
-                List<String> scroll = new ArrayList<>();
-                scroll.add(scrollId);
-                elasticsearchRestTemplate.searchScrollClear(scroll);
+
+            orderBaseVOS1 = BeanUtil.copyToList(orderBaseVOS,OrderBaseVO.class);
+        }
+
+        if (year.equals("2024")) {
+
+            List<OrderBase2024Es> orderBaseVOS = new ArrayList<>();
+            SearchScrollHits<OrderBase2024Es> scrollHits = elasticsearchRestTemplate.searchScrollStart(
+                    60000, // Scroll 上下文保持时间(毫秒)
+                    query,
+                    OrderBase2024Es.class,
+                    IndexCoordinates.of("pg_order_base_2024")
+            );
+
+            String scrollId = scrollHits.getScrollId();
+            int batch = 0;
+
+            if (scrollHits.getTotalHits() > 60000)
+                throw  new RemoteServiceException("数据超过六万上限,请分批导出");
+
+
+            try {
+                while (!scrollHits.isEmpty()) {
+                    // 3. 处理当前批次数据
+                    scrollHits.forEach(hit -> {
+                        OrderBase2024Es entity = hit.getContent();
+                        orderBaseVOS.add(entity);
+                    });
+
+                    batch++;
+
+                    // 4. 获取下一批次
+                    scrollHits = elasticsearchRestTemplate.searchScrollContinue(
+                            scrollId,
+                            60000,
+                            OrderBase2024Es.class,
+                            IndexCoordinates.of("pg_order_base_2024")
+                    );
+                    scrollId = scrollHits.getScrollId(); // 更新 scrollId
+                }
+            } finally {
+                // 5. 清理 Scroll 上下文
+                if (scrollId != null) {
+                    List<String> scroll = new ArrayList<>();
+                    scroll.add(scrollId);
+                    elasticsearchRestTemplate.searchScrollClear(scroll);
+                }
             }
+
+            orderBaseVOS1 = BeanUtil.copyToList(orderBaseVOS,OrderBaseVO.class);
         }
 
-        List<OrderBaseVO> orderBaseVOS1 = BeanUtil.copyToList(orderBaseVOS, OrderBaseVO.class);
 
+        if (year.equals("2022") || Convert.toInt(year) < 2022) {
+
+            List<OrderBase2022Es> orderBaseVOS = new ArrayList<>();
+            SearchScrollHits<OrderBase2022Es> scrollHits = elasticsearchRestTemplate.searchScrollStart(
+                    60000, // Scroll 上下文保持时间(毫秒)
+                    query,
+                    OrderBase2022Es.class,
+                    IndexCoordinates.of("pg_order_base_2022")
+            );
+
+            String scrollId = scrollHits.getScrollId();
+            int batch = 0;
+
+            if (scrollHits.getTotalHits() > 60000)
+                throw  new RemoteServiceException("数据超过六万上限,请分批导出");
+
+
+            try {
+                while (!scrollHits.isEmpty()) {
+                    // 3. 处理当前批次数据
+                    scrollHits.forEach(hit -> {
+                        OrderBase2022Es entity = hit.getContent();
+                        orderBaseVOS.add(entity);
+                    });
+
+                    batch++;
+
+                    // 4. 获取下一批次
+                    scrollHits = elasticsearchRestTemplate.searchScrollContinue(
+                            scrollId,
+                            60000,
+                            OrderBase2022Es.class,
+                            IndexCoordinates.of("pg_order_base_2022")
+                    );
+                    scrollId = scrollHits.getScrollId(); // 更新 scrollId
+                }
+            } finally {
+                // 5. 清理 Scroll 上下文
+                if (scrollId != null) {
+                    List<String> scroll = new ArrayList<>();
+                    scroll.add(scrollId);
+                    elasticsearchRestTemplate.searchScrollClear(scroll);
+                }
+            }
+
+            orderBaseVOS1 = BeanUtil.copyToList(orderBaseVOS,OrderBaseVO.class);
+        }else {
+
+            List<OrderBaseEs> orderBaseVOS = new ArrayList<>();
+            SearchScrollHits<OrderBaseEs> scrollHits = elasticsearchRestTemplate.searchScrollStart(
+                    60000, // Scroll 上下文保持时间(毫秒)
+                    query,
+                    OrderBaseEs.class,
+                    IndexCoordinates.of("pg_order_base")
+            );
+
+            String scrollId = scrollHits.getScrollId();
+            int batch = 0;
+
+            if (scrollHits.getTotalHits() > 60000)
+                throw  new RemoteServiceException("数据超过六万上限,请分批导出");
+
+
+            try {
+                while (!scrollHits.isEmpty()) {
+                    // 3. 处理当前批次数据
+                    scrollHits.forEach(hit -> {
+                        OrderBaseEs entity = hit.getContent();
+                        orderBaseVOS.add(entity);
+                    });
+
+                    batch++;
+
+                    // 4. 获取下一批次
+                    scrollHits = elasticsearchRestTemplate.searchScrollContinue(
+                            scrollId,
+                            60000,
+                            OrderBaseEs.class,
+                            IndexCoordinates.of("pg_order_base")
+                    );
+                    scrollId = scrollHits.getScrollId(); // 更新 scrollId
+                }
+            } finally {
+                // 5. 清理 Scroll 上下文
+                if (scrollId != null) {
+                    List<String> scroll = new ArrayList<>();
+                    scroll.add(scrollId);
+                    elasticsearchRestTemplate.searchScrollClear(scroll);
+                }
+            }
+
+            orderBaseVOS1 = BeanUtil.copyToList(orderBaseVOS,OrderBaseVO.class);
+        }
 
         List<String> orderBaseIds = orderBaseVOS1
                 .stream()

+ 91 - 15
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseLogic.java

@@ -2,6 +2,7 @@ package com.gree.mall.manager.logic.workorder;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
@@ -60,6 +61,7 @@ import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilde
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -81,10 +83,19 @@ public class OrderBaseLogic {
     private final CommonMapper commonMapper;
     private final OrderBaseCMapper orderBaseCMapper;
     private final PgOrderBaseService pgOrderBaseService;
+    private final PgOrderBase2022Service pgOrderBase2022Service;
+    private final PgOrderBase2023Service pgOrderBase2023Service;
+    private final PgOrderBase2024Service pgOrderBase2024Service;
     private final PgOrderWorkerService pgOrderWorkerService;
+    private final PgOrderWorker2022Service pgOrderWorker2022Service;
+    private final PgOrderWorker2023Service pgOrderWorker2023Service;
+    private final PgOrderWorker2024Service pgOrderWorker2024Service;
     private final AdminWebsitService adminWebsitService;
     private final OrderSmallTypeService orderSmallTypeService;
     private final PgOrderProductService pgOrderProductService;
+    private final PgOrderProduct2022Service pgOrderProduct2022Service;
+    private final PgOrderProduct2023Service pgOrderProduct2023Service;
+    private final PgOrderProduct2024Service pgOrderProduct2024Service;
     private final UserAddressService userAddressService;
     private final GoodsCategoryService goodsCategoryService;
     private final UserService userService;
@@ -116,7 +127,9 @@ public class OrderBaseLogic {
      * @param zfireParamBean
      * @return
      */
-    public IPage<OrderBaseVO> orderBaseList(WorkOrderZfireParam zfireParamBean) {
+    public IPage<OrderBaseVO> orderBaseList(WorkOrderZfireParam zfireParamBean, HttpServletRequest request) {
+
+        String year = CommonUtils.getYear(request);
 
         //特殊处理 "异常单","待预约","配件申请中","配件已到货","配件已取消" 的查询条件
         if (zfireParamBean.getParamValue("a.order_status") instanceof String) {
@@ -154,8 +167,21 @@ public class OrderBaseLogic {
         FieldUtils.supplyParam(zfireParamBean, OrderBaseVO.class, commonLogic.getAdminUser());
         zfireParamBean.setAdminWebsitIds(zfireParamBean.getAdminWebsitIds());
 
+        String sqlBase = "pg_order_base";
+        if (year.equals("2024")) {
+            sqlBase = "pg_order_base_2024";
+        }
+        if (year.equals("2023")) {
+            sqlBase = "pg_order_base_2023";
+        }
+
+        if (year.equals("2022") || Convert.toInt(year) < 2022) {
+            sqlBase = "pg_order_base_2022";
+        }
+
+
         IPage<OrderBaseVO> page = commonMapper.orderBaseList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParamBean, adminUser.getType(), adminUser.getType().equals(1) ? adminUser.getCompanyWechatId() : null, orderBaseId);
+                zfireParamBean, adminUser.getType(), adminUser.getType().equals(1) ? adminUser.getCompanyWechatId() : null, orderBaseId, sqlBase);
 
         //服务单标识
         if (zfireParamBean.getPageSize() != -1 && page.getTotal() > 0) {
@@ -163,7 +189,7 @@ public class OrderBaseLogic {
                     .stream()
                     .map(OrderBaseVO::getId)
                     .collect(Collectors.toList());
-            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds);
+            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds, year);
 
             List<WorkerOrder> workerOrderList = workerOrderService.lambdaQuery().in(WorkerOrder::getWorkerOrderId, orderBaseIds)
                     .eq(WorkerOrder::getPayStatus, MaterialExamineStatusEnum.PAID.getKey())
@@ -281,7 +307,7 @@ public class OrderBaseLogic {
         }
 
         if (!StringUtil.isEmpty(orderSmallTypeText))
-            queryBuilder.must(QueryBuilders.termsQuery("order_small_type_text",orderSmallTypeText));
+            queryBuilder.must(QueryBuilders.termsQuery("order_small_type_text", orderSmallTypeText));
 
 
         if (startTime != null)
@@ -1098,22 +1124,53 @@ public class OrderBaseLogic {
      * @param id
      * @return
      */
-    public OrderAddBeanDTO detail(String id) {
-        PgOrderBase orderBase = pgOrderBaseService.getById(id);
+    public OrderAddBeanDTO detail(String id,HttpServletRequest request) {
+        String year = CommonUtils.getYear(request);
+
+        PgOrderBase orderBase = this.getOrderBase(id,year);
         if (Objects.isNull(orderBase)) {
             throw new RemoteServiceException("工单编号不存在");
         }
         OrderAddBeanDTO orderAddBeanDTO = BeanUtil.copyProperties(orderBase, OrderAddBeanDTO.class);
         //产品信息
-        List<PgOrderProduct> list = pgOrderProductService.lambdaQuery().eq(PgOrderProduct::getOrderBaseId, id).list();
+        List<PgOrderProduct> list = this.getOrderProductList(id,year);
         orderAddBeanDTO.setOrderProducts(list);
         //师傅信息
-        orderAddBeanDTO.setOrderWorkers(this.orderWorkerList(id));
+        orderAddBeanDTO.setOrderWorkers(this.orderWorkerList(id,year));
         //标记
-        orderAddBeanDTO.setOrderFlags(orderFlagLogic.list(id));
+        orderAddBeanDTO.setOrderFlags(orderFlagLogic.list(id,year));
         return orderAddBeanDTO;
     }
 
+    private List<PgOrderProduct> getOrderProductList(String id, String year) {
+
+        if (year.equals("2024"))
+            return BeanUtil.copyToList(pgOrderProduct2024Service.lambdaQuery().eq(PgOrderProduct2024::getOrderBaseId,id).list(),PgOrderProduct.class);
+
+        if (year.equals("2023"))
+            return BeanUtil.copyToList(pgOrderProduct2023Service.lambdaQuery().eq(PgOrderProduct2023::getOrderBaseId,id).list(),PgOrderProduct.class);
+
+        if (year.equals("2022"))
+            return BeanUtil.copyToList(pgOrderProduct2022Service.lambdaQuery().eq(PgOrderProduct2022::getOrderBaseId,id).list(),PgOrderProduct.class);
+
+
+        return pgOrderProductService.lambdaQuery().eq(PgOrderProduct::getOrderBaseId,id).list();
+    }
+
+    private PgOrderBase getOrderBase(String id, String year) {
+        if (year.equals("2024"))
+            return BeanUtil.toBean(pgOrderBase2024Service.getById(id),PgOrderBase.class);
+
+        if (year.equals("2023"))
+            return BeanUtil.toBean(pgOrderBase2023Service.getById(id),PgOrderBase.class);
+
+        if (year.equals("2022"))
+            return BeanUtil.toBean(pgOrderBase2022Service.getById(id),PgOrderBase.class);
+
+
+        return pgOrderBaseService.getById(id);
+    }
+
     /**
      * 打标记/取消标记
      *
@@ -1141,8 +1198,19 @@ public class OrderBaseLogic {
      * @param orderBaseId
      * @return
      */
-    public List<PgOrderWorker> orderWorkerList(String orderBaseId) {
+    public List<PgOrderWorker> orderWorkerList(String orderBaseId,String year) {
         //师傅信息
+
+        if (year.equals("2024"))
+            return BeanUtil.copyToList( pgOrderWorker2024Service.lambdaQuery().eq(PgOrderWorker2024::getOrderBaseId, orderBaseId).list(),PgOrderWorker.class);
+
+        if (year.equals("2023"))
+            return BeanUtil.copyToList( pgOrderWorker2023Service.lambdaQuery().eq(PgOrderWorker2023::getOrderBaseId, orderBaseId).list(),PgOrderWorker.class);
+
+        if (year.equals("2022"))
+            return BeanUtil.copyToList( pgOrderWorker2022Service.lambdaQuery().eq(PgOrderWorker2022::getOrderBaseId, orderBaseId).list(),PgOrderWorker.class);
+
+
         List<PgOrderWorker> orderWorkers = pgOrderWorkerService.lambdaQuery().eq(PgOrderWorker::getOrderBaseId, orderBaseId).list();
         return orderWorkers;
     }
@@ -1489,6 +1557,14 @@ public class OrderBaseLogic {
     }
 
     /**
+     * 机型列表
+     */
+    public List<PgOrderProduct> listOrderProduct(String orderBaseId ,HttpServletRequest request) {
+        String year = CommonUtils.getYear(request);
+        return this.getOrderProductList(orderBaseId,year);
+    }
+
+    /**
      * 新增机型
      *
      * @param orderProduct
@@ -1850,7 +1926,7 @@ public class OrderBaseLogic {
                     .stream()
                     .map(OrderBase2VO::getId)
                     .collect(Collectors.toList());
-            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds);
+            Map<String, List<PgOrderFlag>> mapList = orderFlagLogic.list(orderBaseIds,"2025");
             for (OrderBase2VO orderBaseVO : page.getRecords()) {
                 orderBaseVO.setOrderFlags(mapList.get(orderBaseVO.getId()));
             }
@@ -2311,17 +2387,17 @@ public class OrderBaseLogic {
         orderLogLogic.addLog(orderBaseId, "取消工单", "取消工单-家盛茂商城api", "");
     }
 
-    public List<PgOrderBaseDetail> orderDetailJsm(String saleOrderId,List<String> workerOrderIds) {
+    public List<PgOrderBaseDetail> orderDetailJsm(String saleOrderId, List<String> workerOrderIds) {
 
         if (StringUtil.isEmpty(saleOrderId) && CollectionUtil.isEmpty(workerOrderIds))
             return null;
 
         List<PgOrderBase> pgOrderBases = pgOrderBaseService.lambdaQuery()
-                .eq(!StringUtil.isEmpty(saleOrderId),PgOrderBase::getSaleOrderId, saleOrderId)
-                .in(!CollectionUtil.isEmpty(workerOrderIds),PgOrderBase::getId, workerOrderIds)
+                .eq(!StringUtil.isEmpty(saleOrderId), PgOrderBase::getSaleOrderId, saleOrderId)
+                .in(!CollectionUtil.isEmpty(workerOrderIds), PgOrderBase::getId, workerOrderIds)
                 .list();
 
-        List<PgOrderBaseDetail>  pgOrderBaseDetails = new ArrayList<>();
+        List<PgOrderBaseDetail> pgOrderBaseDetails = new ArrayList<>();
 
         for (PgOrderBase pgOrderBase : pgOrderBases) {
             PgOrderBaseDetail pgOrderBaseDetail = BeanUtil.toBean(pgOrderBase, PgOrderBaseDetail.class);

+ 33 - 10
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderFlagLogic.java

@@ -1,16 +1,13 @@
 package com.gree.mall.manager.logic.workorder;
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import com.gree.mall.manager.enums.MaterialExamineStatusEnum;
 import com.gree.mall.manager.enums.workorder.OrderFlagEnum;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.logic.common.CommonLogic;
-import com.gree.mall.manager.plus.entity.PgOrderBase;
-import com.gree.mall.manager.plus.entity.PgOrderFlag;
-import com.gree.mall.manager.plus.entity.RpMaterialOrder;
-import com.gree.mall.manager.plus.service.PgOrderBaseService;
-import com.gree.mall.manager.plus.service.PgOrderFlagService;
-import com.gree.mall.manager.plus.service.RpMaterialOrderService;
+import com.gree.mall.manager.plus.entity.*;
+import com.gree.mall.manager.plus.service.*;
 import com.gree.mall.manager.utils.StringUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +28,16 @@ public class OrderFlagLogic {
 
     @Autowired
     PgOrderFlagService pgOrderFlagService;
+
+    @Autowired
+    PgOrderFlag2022Service pgOrderFlag2022Service;
+
+    @Autowired
+    PgOrderFlag2023Service pgOrderFlag2023Service;
+
+    @Autowired
+    PgOrderFlag2024Service pgOrderFlag2024Service;
+
     @Autowired
     PgOrderBaseService pgOrderBaseService;
     @Autowired
@@ -136,11 +143,11 @@ public class OrderFlagLogic {
     /**
      * 查询服务单标识-列表
      */
-    public List<PgOrderFlag> list(String orderBaseId){
-        return this.list(orderBaseId,1);
+    public List<PgOrderFlag> list(String orderBaseId,String year){
+        return this.list(orderBaseId,1,year);
     }
 
-    public Map<String, List<PgOrderFlag>> list(List<String> orderBaseIds){
+    public Map<String, List<PgOrderFlag>> list(List<String> orderBaseIds,String year){
         if(CollectionUtil.isEmpty(orderBaseIds)){
             return Collections.emptyMap();
         }
@@ -153,7 +160,23 @@ public class OrderFlagLogic {
      * @param type 0=系统内部标注用  1=需要展示在服务单列表上的
      * @return
      */
-    public List<PgOrderFlag> list(String orderBaseId,Integer type){
+    public List<PgOrderFlag> list(String orderBaseId,Integer type,String year){
+
+        if (year.equals("2024")){
+            return BeanUtil.copyToList(pgOrderFlag2024Service.lambdaQuery()
+                    .eq(PgOrderFlag2024::getOrderBaseId, orderBaseId)
+                    .eq(type != null,PgOrderFlag2024::getType,type)
+                    .orderByAsc(PgOrderFlag2024::getSortNum)
+                    .list(),PgOrderFlag.class);
+        }
+        if (year.equals("2023")){
+            return BeanUtil.copyToList(pgOrderFlag2023Service.lambdaQuery()
+                    .eq(PgOrderFlag2023::getOrderBaseId, orderBaseId)
+                    .eq(type != null,PgOrderFlag2023::getType,type)
+                    .orderByAsc(PgOrderFlag2023::getSortNum)
+                    .list(),PgOrderFlag.class);
+        }
+
         return pgOrderFlagService.lambdaQuery()
                 .eq(PgOrderFlag::getOrderBaseId, orderBaseId)
                 .eq(type != null,PgOrderFlag::getType,type)

+ 47 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderLogLogic.java

@@ -29,6 +29,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -42,6 +43,9 @@ public class OrderLogLogic {
     private final CommonLogic commonLogic;
     private final OrderFlagLogic orderFlagLogic;
     private final PgOrderOperatorLogService pgOrderOperatorLogService;
+    private final PgOrderOperatorLog2022Service pgOrderOperatorLog2022Service;
+    private final PgOrderOperatorLog2023Service pgOrderOperatorLog2023Service;
+    private final PgOrderOperatorLog2024Service pgOrderOperatorLog2024Service;
     private final PgOrderBaseService pgOrderBaseService;
     private final PgOrderSettleNormService pgOrderSettleNormService;
     private final PgSettleOrderService pgSettleOrderService;
@@ -66,8 +70,49 @@ public class OrderLogLogic {
      * @param orderBaseId
      * @return
      */
-    public List<PgOrderOperatorLog> operatorLogList(String orderBaseId){
+    public List<PgOrderOperatorLog> operatorLogList(String orderBaseId, HttpServletRequest request){
+        String year = CommonUtils.getYear(request);
+
+
+        return this.getOperatorLog(orderBaseId,year);
+
+
+    }
+
+    private List<PgOrderOperatorLog> getOperatorLog(String orderBaseId, String year) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
+
+
+        if (year.equals("2024")){
+            return BeanUtil.copyToList(pgOrderOperatorLog2024Service.lambdaQuery()
+                    .eq(PgOrderOperatorLog2024::getOrderBaseId, orderBaseId)
+                    .eq(StringUtils.isNotBlank(adminUser.getCompanyWechatId()),
+                            PgOrderOperatorLog2024::getCompanyWechatId,
+                            adminUser.getCompanyWechatId())
+                    .orderByDesc(PgOrderOperatorLog2024::getCreateTime,PgOrderOperatorLog2024::getId)
+                    .list(),PgOrderOperatorLog.class);
+        }
+
+        if (year.equals("2023")){
+            return BeanUtil.copyToList(pgOrderOperatorLog2023Service.lambdaQuery()
+                    .eq(PgOrderOperatorLog2023::getOrderBaseId, orderBaseId)
+                    .eq(StringUtils.isNotBlank(adminUser.getCompanyWechatId()),
+                            PgOrderOperatorLog2023::getCompanyWechatId,
+                            adminUser.getCompanyWechatId())
+                    .orderByDesc(PgOrderOperatorLog2023::getCreateTime,PgOrderOperatorLog2023::getId)
+                    .list(),PgOrderOperatorLog.class);
+        }
+
+        if (year.equals("2022")){
+            return BeanUtil.copyToList(pgOrderOperatorLog2022Service.lambdaQuery()
+                    .eq(PgOrderOperatorLog2022::getOrderBaseId, orderBaseId)
+                    .eq(StringUtils.isNotBlank(adminUser.getCompanyWechatId()),
+                            PgOrderOperatorLog2022::getCompanyWechatId,
+                            adminUser.getCompanyWechatId())
+                    .orderByDesc(PgOrderOperatorLog2022::getCreateTime,PgOrderOperatorLog2022::getId)
+                    .list(),PgOrderOperatorLog.class);
+        }
+
         List<PgOrderOperatorLog> list = pgOrderOperatorLogService.lambdaQuery()
                 .eq(PgOrderOperatorLog::getOrderBaseId, orderBaseId)
                 .eq(StringUtils.isNotBlank(adminUser.getCompanyWechatId()),
@@ -75,6 +120,7 @@ public class OrderLogLogic {
                         adminUser.getCompanyWechatId())
                 .orderByDesc(PgOrderOperatorLog::getCreateTime,PgOrderOperatorLog::getId)
                 .list();
+
         return list;
     }
 

+ 1 - 1
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -320,7 +320,7 @@
     <select id="orderBaseList" resultType="com.gree.mall.manager.bean.listvo.workorder.OrderBaseVO">
         select
           ${ex.selected}
-        from pg_order_base a
+        from ${sqlBase} a
           ${ex.query}
           <if test="ex.orderSmallType != null and ex.orderSmallType !=''">
               and a.order_small_type = #{ex.orderSmallType}

+ 0 - 142
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/CarouselMapController.java

@@ -1,142 +0,0 @@
-package com.gree.mall.manager.controller;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.carouselMap.CarouselMapVO;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.CarouselMapLogic;
-import com.gree.mall.manager.plus.entity.CarouselMap;
-import com.gree.mall.manager.plus.entity.Goods;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "轮播图管理", tags ={"轮播图管理"} )
-@RequestMapping(value = "/carouselMap", produces = "application/json; charset=utf-8")
-public class CarouselMapController {
-
-    @Resource
-    CarouselMapLogic carouselMapLogic;
-
-
-
-
-    @ZfireList
-    @PostMapping("/list/pageV2")
-    @ApiOperation(value = "轮播图列表V2")
-    public ResponseHelper<IPage<CarouselMapVO>> pageV2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ) {
-        IPage<CarouselMapVO> page = carouselMapLogic.pageV2(zfireParamBean);
-        return ResponseHelper.success(page, new TypeReference<CarouselMapVO>() {});
-    }
-
-    @PostMapping("/pageExport")
-    @ApiOperation(value = "轮播图列表V2导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<CarouselMapVO> page = carouselMapLogic.pageV2(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-
-
-    @GetMapping("/list/page")
-    @ApiOperation(value = "轮播图列表")
-    public ResponseHelper<Page<CarouselMap>> page(
-            HttpServletRequest request,
-            @ApiParam(value = "状态(true:启用 false:禁用") @RequestParam(required = false) Boolean state,
-            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
-    ) throws RemoteServiceException {
-        IPage<CarouselMap> page = carouselMapLogic.page(request, state,pageNum, pageSize);
-        return ResponseHelper.success(page);
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "轮播详情")
-    public ResponseHelper<CarouselMap> detail(
-            @ApiParam(value = "id",required = true) @RequestParam() String id
-    ) throws RemoteServiceException {
-        CarouselMap detail = carouselMapLogic.detail(id);
-        return ResponseHelper.success(detail);
-    }
-
-
-    @PostMapping("/add")
-    @ApiOperation(value = "新增轮播图")
-    public ResponseHelper add(
-            HttpServletRequest request,
-            @ApiParam(value = "object",required = true) @RequestBody CarouselMap carouselMapBean) {
-        carouselMapLogic.add(request, carouselMapBean);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/update")
-    @ApiOperation(value = "修改轮播图")
-    public ResponseHelper update(
-            @ApiParam(value = "object",required = true) @RequestBody CarouselMap carouselMapBean) {
-        carouselMapLogic.update(carouselMapBean);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation(value = "删除轮播图")
-    public ResponseHelper delete(
-            @ApiParam(value = "轮播图id",required = true) @RequestParam String carouselMapId
-    ) {
-        carouselMapLogic.delete(carouselMapId);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/batch/delete")
-    @ApiOperation(value = "删除轮播图")
-    public ResponseHelper delete(
-            @ApiParam(value = "轮播图id",required = true) @RequestBody List<String> ids
-    ) {
-        carouselMapLogic.delete(ids);
-        return ResponseHelper.success();
-    }
-
-
-    @PostMapping("/state/update")
-    @ApiOperation(value = "禁用/正常")
-    public ResponseHelper change(
-            @ApiParam(value = "轮播图id",required = true) @RequestParam String carouselMapId,
-            @ApiParam(value = "状态:true上架 false下架",required = true) @RequestParam Boolean state
-    ) {
-        carouselMapLogic.updateState(carouselMapId, state);
-        return ResponseHelper.success();
-    }
-
-    @GetMapping("/list/goods")
-    @ApiOperation(value = "商品列表")
-    public ResponseHelper<Page<Goods>> page(
-            HttpServletRequest request,
-            @ApiParam(value = "商品id") @RequestParam(required = false) String goodsId,
-            @ApiParam(value = "商品名称") @RequestParam(required = false) String goodsName,
-            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
-    ) throws RemoteServiceException {
-        IPage<Goods> page = carouselMapLogic.getGoods(request, goodsId, goodsName,pageNum, pageSize);
-        return ResponseHelper.success(page);
-    }
-}

+ 0 - 125
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/FreightController.java

@@ -1,125 +0,0 @@
-package com.gree.mall.manager.controller;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.Freight.FreightTemplateBean;
-import com.gree.mall.manager.bean.Freight.RegionTreeBean;
-import com.gree.mall.manager.bean.FreightTemplateVO;
-import com.gree.mall.manager.bean.carouselMap.CarouselMapVO;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.FreightLogic;
-import com.gree.mall.manager.plus.entity.FreightTemplate;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "运费管理", tags ={"运费管理"} )
-@RequestMapping(value = "/freight", produces = "application/json; charset=utf-8")
-public class FreightController {
-
-    @Autowired
-    FreightLogic freightLogic;
-
-
-    @ZfireList
-    @PostMapping("/list/pageV2")
-    @ApiOperation(value = "运费模板列表V2")
-    public ResponseHelper<IPage<FreightTemplateVO>> pageV2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ) {
-        IPage<FreightTemplateVO> page = freightLogic.pageV2(zfireParamBean);
-        return ResponseHelper.success(page, new TypeReference<FreightTemplateVO>() {});
-    }
-
-    @PostMapping("/pageExport")
-    @ApiOperation(value = "运费模板列表V2导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<FreightTemplateVO> page = freightLogic.pageV2(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-
-
-    @GetMapping("/list")
-    @ApiOperation(value = "运费模板列表")
-    public ResponseHelper<Page<FreightTemplate>> page(
-            HttpServletRequest request,
-            @ApiParam(value = "名称",required = false) @RequestParam(required = false) String name,
-            @ApiParam(value = "状态(true:启用 false:禁用",required = false) @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "开始时间",required = false) @RequestParam(required = false) String startTime,
-            @ApiParam(value = "结束时间",required = false) @RequestParam(required = false) String endTime,
-            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
-    ){
-        IPage<FreightTemplate> list = freightLogic.list(request,name, status, startTime, endTime, pageNum, pageSize);
-        return ResponseHelper.success(list);
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "运费模板详情")
-    public ResponseHelper<FreightTemplateBean> detail(
-            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId
-    ){
-        FreightTemplateBean detail = freightLogic.detail(freightTemplateId);
-        return ResponseHelper.success(detail);
-    }
-
-
-    @PostMapping("/delete")
-    @ApiOperation(value = "删除运费模板")
-    public ResponseHelper delete(
-            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId
-    ){
-        freightLogic.delete(freightTemplateId);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/save")
-    @ApiOperation(value = "新增修改运费模板")
-    public ResponseHelper delete(
-            @ApiParam(value = "模板",required = true) @RequestBody(required = true) FreightTemplateBean freightTemplateBean,
-            HttpServletRequest request
-    ){
-        freightLogic.save(freightTemplateBean,request);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/status/update")
-    @ApiOperation(value = "修改运费模板状态")
-    public ResponseHelper updateStatus(
-            @ApiParam(value = "模板id",required = true) @RequestParam(required = true) String freightTemplateId,
-            @ApiParam(value = "状态:true=启用 false=禁用",required = true) @RequestParam(required = true) Boolean status
-    ){
-        freightLogic.updateStatus(freightTemplateId,status);
-        return ResponseHelper.success();
-    }
-
-
-    @GetMapping("/region/tree")
-    @ApiOperation(value = "获取地区树")
-    public ResponseHelper<List<RegionTreeBean>> regionTree(
-            @ApiParam(value = "等级(1=省,2=市,3=区,4=街道,5=社区)(默认为区以上)",required = false) @RequestParam(required = false) Integer level
-    ){
-        List<RegionTreeBean> regionTreeBeans = freightLogic.regionTree(level);
-        return ResponseHelper.success(regionTreeBeans);
-    }
-
-}

+ 0 - 115
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/StorageController.java

@@ -1,115 +0,0 @@
-package com.gree.mall.manager.controller;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.StorageVO;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.StorageLogic;
-import com.gree.mall.manager.plus.entity.Storage;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "仓储管理", tags ={"仓储管理"} )
-@RequestMapping(value = "/storage", produces = "application/json; charset=utf-8")
-public class StorageController {
-
-    @Resource
-    StorageLogic storageLogic;
-
-    @ZfireList
-    @PostMapping("/list/pageV2")
-    @ApiOperation(value = "仓储列表V2")
-    public ResponseHelper<IPage<StorageVO>> pageV2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ) {
-        IPage<StorageVO> page = storageLogic.pageV2(zfireParamBean);
-        return ResponseHelper.success(page, new TypeReference<StorageVO>() {});
-    }
-
-    @PostMapping("/pageExport")
-    @ApiOperation(value = "仓储列表V2导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<StorageVO> page = storageLogic.pageV2(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-    @GetMapping("/list")
-    @ApiOperation(value = "仓储列表")
-    public ResponseHelper<Page<Storage>> page(
-            @ApiParam(value = "属性", required = false) @RequestParam(required = false) String type,
-            @ApiParam(value = "状态") @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize,
-            HttpServletRequest request
-    ) throws RemoteServiceException {
-        IPage<Storage> page = storageLogic.page(type, status, pageNum, pageSize, request);
-        return ResponseHelper.success(page);
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "仓储详情")
-    public ResponseHelper<Storage> detail(
-            @ApiParam(value = "id",required = true) @RequestParam() String id
-    ) throws RemoteServiceException {
-        Storage detail = storageLogic.detail(id);
-        return ResponseHelper.success(detail);
-    }
-
-
-    @PostMapping("/add")
-    @ApiOperation(value = "新增仓储")
-    public ResponseHelper add(
-            HttpServletRequest request,
-            @ApiParam(value = "object",required = true) @RequestBody Storage storage) {
-        storageLogic.add(request,storage);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/update")
-    @ApiOperation(value = "修改仓储")
-    public ResponseHelper update(
-            @ApiParam(value = "object",required = true) @RequestBody Storage storage) {
-        storageLogic.update(storage);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation(value = "删除仓储")
-    public ResponseHelper delete(
-            @ApiParam(value = "仓储id",required = true) @RequestParam String storageId
-    ) {
-        storageLogic.delete(storageId);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/batch/update/status")
-    @ApiOperation(value = "仓储管理-批量更新状态")
-    public ResponseHelper batchUpdateStatus(
-            @ApiParam(value = "id", required = true) @RequestParam List<String> ids,
-            @ApiParam(value = "状态 true=开启 false=关闭", required = true) @RequestParam Boolean status
-    ) throws Exception {
-        storageLogic.batchUpdateStatus(ids, status);
-        return ResponseHelper.success();
-    }
-
-}

+ 0 - 71
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyPayConfigController.java

@@ -1,71 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.admin.AdminCompanyPayConfigVO;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminCompanyPayConfigLogic;
-import com.gree.mall.manager.plus.entity.AdminCompanyWechatPayConfig;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-@RestController
-@Api(value = "商户支付配置", tags = {"商户支付配置"})
-@RequestMapping(value = "/admin/company/pay/config", produces = "application/json; charset=utf-8")
-public class AdminCompanyPayConfigController {
-
-    @Resource
-    AdminCompanyPayConfigLogic adminCompanyPayConfigLogic;
-
-    @ZfireList
-    @PostMapping("/list")
-    @ApiOperation(value = "列表")
-    public ResponseHelper<Page<AdminCompanyPayConfigVO>> list(
-            @RequestBody ZfireParamBean zfireParamBean
-    ) {
-        IPage<AdminCompanyPayConfigVO> vo = adminCompanyPayConfigLogic.list(zfireParamBean);
-        return ResponseHelper.success(vo, new TypeReference<AdminCompanyPayConfigVO>() {});
-    }
-
-    @PostMapping("/list/export")
-    @ApiOperation(value = "导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<AdminCompanyPayConfigVO> page = adminCompanyPayConfigLogic.list(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(page.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-    @PostMapping("/detail")
-    @ApiOperation(value = "详情")
-    public ResponseHelper<AdminCompanyWechatPayConfig> detail(
-            @ApiParam(value = "id", required = true) @RequestParam String id
-    ) throws RemoteServiceException {
-        AdminCompanyWechatPayConfig bean = adminCompanyPayConfigLogic.detail(id);
-        return ResponseHelper.success(bean);
-    }
-
-    @PostMapping("/save")
-    @ApiOperation(value = "保存")
-    public ResponseHelper save(
-            @RequestBody AdminCompanyWechatPayConfig bean
-    ) throws Exception {
-
-        adminCompanyPayConfigLogic.save(bean);
-
-        return ResponseHelper.success();
-    }
-}

+ 0 - 48
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatOtherController.java

@@ -1,48 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminCompanyWechatOtherLogic;
-import com.gree.mall.manager.plus.entity.AdminCompanyWechatOther;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-
-@RestController
-@Api(value = "小程序其他配置", tags = {"小程序其他配置"})
-@RequestMapping(value = "/admin/company/other", produces = "application/json; charset=utf-8")
-public class AdminCompanyWechatOtherController {
-
-
-    @Autowired
-    private AdminCompanyWechatOtherLogic adminCompanyWechatOtherLogic;
-
-
-    @GetMapping("/getOne")
-    @ApiOperation("获取企业其他配置")
-    public ResponseHelper<AdminCompanyWechatOther> getOne(HttpServletRequest request) {
-
-        return ResponseHelper.success(adminCompanyWechatOtherLogic.getOne(request));
-    }
-
-    @PostMapping("/init")
-    @ApiOperation("初始化其他配置")
-    public ResponseHelper init(
-            @ApiParam(value = "企业微信id", required = true) @RequestParam String companyId,
-            @ApiParam(value = "企业名称", required = true) @RequestParam String companyName) {
-        adminCompanyWechatOtherLogic.init(companyId, companyName);
-        return ResponseHelper.success();
-    }
-
-
-
-    @ApiOperation("更新其他配置")
-    @PostMapping("/update")
-    public ResponseHelper update(@RequestBody AdminCompanyWechatOther other,HttpServletRequest request) {
-        adminCompanyWechatOtherLogic.update(other,request);
-        return ResponseHelper.success();
-    }
-}

+ 0 - 61
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminCompanyWechatTemplateController.java

@@ -1,61 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.gree.mall.manager.bean.admin.reqDto.AdminCompanyWechatTemplateUpdateReqDto;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminCompanyWechatTemplateLogic;
-import com.gree.mall.manager.plus.entity.AdminCompanyWechatTemplate;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.omg.CORBA.PUBLIC_MEMBER;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-
-@RestController
-@Api(value = "小程序模板", tags ={"小程序模板"} )
-@RequestMapping(value = "/admin/company/template", produces = "application/json; charset=utf-8")
-public class AdminCompanyWechatTemplateController {
-
-    @Autowired
-    private AdminCompanyWechatTemplateLogic adminCompanyWechatTemplateLogic;
-
-
-
-    @GetMapping("/detail")
-    @ApiOperation("获取企业下模板")
-    public ResponseHelper<List<AdminCompanyWechatTemplate>> getTemplate( @ApiParam(value = "企业id",required = true) @RequestParam String companyId) {
-
-
-        return ResponseHelper.success(adminCompanyWechatTemplateLogic.getTemplate(companyId));
-    }
-
-
-    @PostMapping("/updateTemplate")
-    @ApiOperation("更改模板信息")
-    public ResponseHelper updateTemplate(HttpServletRequest request,@RequestBody AdminCompanyWechatTemplate adminCompanyWechatTemplate) {
-        adminCompanyWechatTemplateLogic.updateTemplate(request, adminCompanyWechatTemplate);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/updateCompanyWithTemplate")
-    @ApiOperation("更改企业信息和模板信息")
-    public ResponseHelper updateCompanyWithTemplate(@RequestBody AdminCompanyWechatTemplateUpdateReqDto reqDto) {
-        adminCompanyWechatTemplateLogic.updateCompanyWithTemplate(reqDto);
-        return ResponseHelper.success();
-    }
-
-
-    @PostMapping("/initCompanyWechatTemplate")
-    @ApiOperation("初始化企业微信模板")
-    public ResponseHelper initCompanyWechatTemplate(
-            @ApiParam(required = true,value = "企业微信id")@RequestParam String companyWechatId,
-            @ApiParam(required = true,value = "企业名称")@RequestParam String companyName
-    ) {
-
-        adminCompanyWechatTemplateLogic.initCompanyWechatTemplate(companyWechatId, companyName);
-        return ResponseHelper.success();
-    }
-}

+ 0 - 160
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminDeptController.java

@@ -1,160 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.admin.AdminDeptTree;
-import com.gree.mall.manager.bean.admin.AdminDeptWebsitVO;
-import com.gree.mall.manager.bean.notice.NoticeRecordReadBean;
-import com.gree.mall.manager.bean.workorder.IncreAddOrUp;
-import com.gree.mall.manager.bean.workorder.IncreVO;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminDeptLogic;
-import com.gree.mall.manager.plus.entity.AdminDept;
-import com.gree.mall.manager.plus.entity.AdminDeptWebsit;
-import com.gree.mall.manager.utils.excel.ExcelUtils;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.text.ParseException;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "部门级别api", tags = {"部门级别api"})
-@RequestMapping(value = "/admin/dept", produces = "application/json; charset=utf-8")
-public class AdminDeptController {
-
-    @Autowired
-    AdminDeptLogic adminDeptLogic;
-
-
-    @GetMapping("/tree")
-    @ApiOperation("部门树")
-    public ResponseHelper<AdminDeptTree> tree(HttpServletRequest request) {
-        List<AdminDeptTree> tree = adminDeptLogic.tree(request);
-        return ResponseHelper.success(tree);
-    }
-
-    @GetMapping("/treeWebsit")
-    @ApiOperation("部门树合并网点")
-    public ResponseHelper<AdminDeptTree> treeWebsit(HttpServletRequest request) {
-        List<AdminDeptTree> tree = adminDeptLogic.treeWebsit(request);
-        return ResponseHelper.success(tree);
-    }
-
-
-    @ZfireList
-    @PostMapping("/list")
-    @ApiOperation(value = "部门网点列表")
-    public ResponseHelper<IPage<AdminDeptWebsitVO>> list(
-            @RequestBody ZfireParamBean zfireParamBean
-    ) throws RemoteServiceException {
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        IPage<AdminDeptWebsitVO> adminDeptVOIPage = adminDeptLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
-        return ResponseHelper.success(adminDeptVOIPage, new TypeReference<AdminDeptWebsitVO>() {});
-    }
-
-    @PostMapping("/list/export")
-    @ApiOperation(value = "部门网点列表导出")
-    public void listExport(
-            @RequestBody ZfireParamBean zfireParamBean,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<AdminDeptWebsitVO> adminDeptVOIPage = adminDeptLogic.list(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
-        //3.导出
-        FieldUtils.exportData(adminDeptVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-    @PostMapping("/add")
-    @ApiOperation("添加部门")
-    public ResponseHelper add(
-            @RequestBody AdminDept adminDept,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.add(adminDept);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/update")
-    @ApiOperation("修改部门")
-    public ResponseHelper update(
-            @RequestBody AdminDept adminDept,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.update(adminDept);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/del")
-    @ApiOperation("删除部门")
-    public ResponseHelper update(
-            @ApiParam(value = "部门id" , required = true) @RequestParam(required = true) String adminDeptId,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.del(adminDeptId);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/addWebsit")
-    @ApiOperation("添加部门网点")
-    public ResponseHelper addWebsit(
-            @ApiParam(value = "部门id" , required = true) @RequestParam(required = true) String adminDeptId,
-            @ApiParam(value = "网点" , required = true) @RequestParam(required = true) List<String> websitIds,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.addWebsit(adminDeptId,websitIds);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/updateWebsit")
-    @ApiOperation("修改部门网点")
-    public ResponseHelper updateWebsit(
-            @RequestBody AdminDeptWebsit adminDeptWebsit,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.updateWebsit(adminDeptWebsit);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delWebsit")
-    @ApiOperation("删除部门网点")
-    public ResponseHelper delWebsit(
-            @ApiParam(value = "部门网点id" , required = true) @RequestParam(required = true) String adminDeptWebsitId,
-            HttpServletRequest request
-    ) throws ParseException {
-        adminDeptLogic.delWebsit(adminDeptWebsitId);
-        return ResponseHelper.success();
-    }
-
-
-
-    @PostMapping("/import")
-    @ApiOperation("导入部门网点")
-    public ResponseHelper importData(
-            @RequestPart("file") MultipartFile file
-    ) throws IOException {
-        List<Object> objects = ExcelUtils.importExcel(file);
-        adminDeptLogic.importData(objects);
-        return ResponseHelper.success();
-    }
-
-
-}

+ 0 - 56
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminModuleController.java

@@ -1,56 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.bean.admin.AdminModuleBean;
-import com.gree.mall.manager.bean.admin.AdminModuleVO;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminModuleLogic;
-import com.gree.mall.manager.plus.entity.AdminModule;
-import com.gree.mall.manager.plus.entity.AdminRole;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-@Slf4j
-@RestController
-@Api(value = "系统菜单管理", tags ={"系统菜单管理"} )
-@RequestMapping(value = "/admin/module", produces = "application/json; charset=utf-8")
-public class AdminModuleController {
-
-    @Autowired
-    AdminModuleLogic adminModuleLogic;
-
-    @GetMapping("/detail")
-    @ApiOperation("详情")
-    public ResponseHelper<AdminModuleVO> detail(@RequestParam String moduleId){
-        AdminModuleVO detail = adminModuleLogic.detail(moduleId);
-        return ResponseHelper.success(detail);
-    }
-
-    @PostMapping("/add")
-    @ApiOperation("新增")
-    public ResponseHelper add(@RequestBody AdminModuleBean adminModule){
-        adminModuleLogic.add(adminModule);
-        return ResponseHelper.success();
-    }
-
-
-    @PostMapping("/update")
-    @ApiOperation("修改")
-    public ResponseHelper update(@RequestBody AdminModule adminModule){
-        adminModuleLogic.update(adminModule);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation("删除")
-    public ResponseHelper delete(@RequestParam String id){
-        adminModuleLogic.delete(id);
-        return ResponseHelper.success();
-    }
-
-
-
-}

+ 0 - 85
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminRoleController.java

@@ -1,85 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.bean.user.RoleTypeBean;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.AdminRoleLogic;
-import com.gree.mall.manager.plus.entity.AdminRole;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "系统角色管理", tags ={"系统角色管理"} )
-@RequestMapping(value = "/admin/role", produces = "application/json; charset=utf-8")
-public class AdminRoleController {
-
-    @Autowired
-    AdminRoleLogic adminRoleLogic;
-
-    @GetMapping("/list")
-    @ApiOperation(value = "角色列表")
-    public ResponseHelper<IPage<AdminRole>> list(
-            HttpServletRequest request,
-            @ApiParam(value = "商户名称") @RequestParam(required = false) String companyWechatName,
-            @ApiParam(value = "父角色名") @RequestParam(required = false) String parentRoleName,
-            @ApiParam(value = "页号",required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam Integer pageSize
-    ) throws RemoteServiceException {
-        IPage<AdminRole> adminRoleIPage = adminRoleLogic.listPage(request, companyWechatName, parentRoleName, pageNum, pageSize);
-        return ResponseHelper.success(adminRoleIPage);
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "角色详情")
-    public ResponseHelper<AdminRole> detail(
-            @ApiParam(value = "角色id",required = true) @RequestParam(required = true) String adminRoleId
-    ) throws RemoteServiceException {
-        AdminRole detail = adminRoleLogic.detail(adminRoleId);
-        return ResponseHelper.success(detail);
-    }
-
-    @PostMapping("/add")
-    @ApiOperation(value = "新增角色")
-    public ResponseHelper add(
-            HttpServletRequest request,
-            @RequestBody AdminRole adminRole
-    ) throws RemoteServiceException {
-        adminRoleLogic.add(request,adminRole);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/update")
-    @ApiOperation(value = "修改角色")
-    public ResponseHelper update(@RequestBody AdminRole adminRole) throws RemoteServiceException {
-        adminRoleLogic.update(adminRole);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation(value = "删除角色")
-    public ResponseHelper delete(
-            @ApiParam(value = "角色id",required = true) @RequestParam String adminRoleId
-    ) throws RemoteServiceException {
-        adminRoleLogic.delete(adminRoleId);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/get/role/type")
-    @ApiOperation(value = "获取角色类型")
-    public ResponseHelper<List<RoleTypeBean>> getRoleType() throws RemoteServiceException {
-        List<RoleTypeBean> list = adminRoleLogic.getRoleType();
-        return ResponseHelper.success(list);
-    }
-
-
-
-}

+ 0 - 271
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/AdminUserController.java

@@ -1,271 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.bean.ExcelData;
-import com.gree.mall.manager.bean.SVerification;
-import com.gree.mall.manager.bean.admin.*;
-import com.gree.mall.manager.bean.admin.reqDto.AdminCompanyWechatReqBean;
-import com.gree.mall.manager.bean.admin.reqDto.AdminUserAddReqBean;
-import com.gree.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
-import com.gree.mall.manager.constant.Constant;
-import com.gree.mall.manager.logic.admin.AdminCompanyWechatLogic;
-import com.gree.mall.manager.logic.admin.AdminUserLogic;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
-import com.gree.mall.manager.plus.entity.AdminUser;
-import com.gree.mall.manager.utils.excel.ExcelUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.integration.redis.util.RedisLockRegistry;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-
-@Slf4j
-@RestController
-@Api(value = "系统用户管理", tags ={"后台用户相关API"} )
-@RequestMapping(value = "/admin/user", produces = "application/json; charset=utf-8")
-public class AdminUserController {
-
-    @Autowired
-    AdminUserLogic adminUserLogic;
-    @Autowired
-    AdminCompanyWechatLogic adminCompanyWechatLogic;
-    @Autowired
-    RedisLockRegistry redisLockRegistry;
-
-
-
-
-    @ApiNotAuth
-    @PostMapping("/login")
-    @ApiOperation(value = "登录")
-    public ResponseHelper<AdminUserCom> login(
-            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String userName,
-            @ApiParam(value = "密码",required = false) @RequestParam(required = false) String password,
-            @ApiParam(value = "验证码code",required = false) @RequestParam(required = false) String code,
-            @ApiParam(value = "验证码值",required = false) @RequestParam(required = false) String codeValue
-
-    ) throws RemoteServiceException, InterruptedException {
-        Lock obtain = redisLockRegistry.obtain(Constant.RedisPrefix.LOCK_LOGIN + userName);
-        if(!obtain.tryLock(10, TimeUnit.SECONDS)){
-            throw new RemoteServiceException("系统繁忙请稍后再试");
-        }
-        try {
-            AdminUserCom adminUserCom = adminUserLogic.login(userName, password, code, codeValue);
-            return ResponseHelper.success(adminUserCom);
-        }finally {
-            obtain.unlock();
-        }
-    }
-
-    @PostMapping("/password/update")
-    @ApiOperation(value = "修改密码")
-    public ResponseHelper<AdminUserBean> login(
-            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String userName,
-            @ApiParam(value = "密码",required = true) @RequestParam(required = true) String password,
-            @ApiParam(value = "新密码",required = true) @RequestParam(required = true) String newPassword
-    ) throws RemoteServiceException {
-        adminUserLogic.updatePassword(userName, password,newPassword);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/status/update")
-    @ApiOperation("修改帐号状态(冻结/正常)")
-    public ResponseHelper updateStatus(
-            @ApiParam(value = "帐号名称",required = true) @RequestParam(required = true) String adminUserId,
-            @ApiParam(value = "true:正常  false:冻结",required = true) @RequestParam(required = true) Boolean status
-    ) throws RemoteServiceException {
-        adminUserLogic.updateStatus(adminUserId,status);
-        return ResponseHelper.success();
-    }
-
-
-    @ApiNotAuth
-    @PostMapping("/addCompanyWechat")
-    @ApiOperation("新增商户")
-    public ResponseHelper addCompanyWechat(
-            @ApiParam(value = "帐号",required = true) @RequestBody AdminCompanyWechatReqBean adminUserBean,
-            HttpServletRequest request
-    ) throws RemoteServiceException {
-        adminCompanyWechatLogic.addCompanyWechat(adminUserBean);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/add")
-    @ApiOperation("新增帐号")
-    public ResponseHelper add(
-            @ApiParam(value = "帐号",required = true) @RequestBody AdminUserAddReqBean adminUserBean
-    ) throws RemoteServiceException {
-        adminUserLogic.add(adminUserBean,false, false);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/user/updateCompanyWechat")
-    @ApiOperation(value = "修改商户信息")
-    public ResponseHelper updateCompanyWechat(
-            @ApiParam(value = "商户信息", required = true) @RequestBody AdminCompanyWechat adminCompanyWechat
-    ) throws RemoteServiceException {
-        adminCompanyWechatLogic.updateCompanyWechat(adminCompanyWechat);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/user/update")
-    @ApiOperation(value = "修改帐号")
-    public ResponseHelper updateUser(
-            HttpServletRequest request,
-            @ApiParam(value = "帐号", required = true) @RequestBody AdminUserAddReqBean adminUserBean
-    ) throws RemoteServiceException {
-        adminUserLogic.update(request, adminUserBean);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/password/reset")
-    @ApiOperation("重置密码")
-    public ResponseHelper resetPwd (
-            @ApiParam(value = "用户id",required = true) @RequestParam(required = true) String adminUserId,
-            @ApiParam(value = "密码",required = true) @RequestParam(required = true) String password,
-            HttpServletRequest request
-    ) throws RemoteServiceException {
-        adminUserLogic.resetPassword(adminUserId,password,request);
-        return ResponseHelper.success();
-    }
-
-
-    @GetMapping("/list")
-    @ApiOperation(value = "帐号列表")
-    public ResponseHelper<IPage<AdminUser>> list(
-            @ApiParam(value = "商户id",required = false) @RequestParam(required = false) String companyWechatId,
-            @ApiParam(value = "商户名称",required = false) @RequestParam(required = false) String companyWechatName,
-            @ApiParam(value = "角色id",required = false) @RequestParam(required = false) String roleId,
-            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "用户名",required = false) @RequestParam(required = false) String userName,
-            @ApiParam(value = "网点id",required = false) @RequestParam(required = false) String websitId,
-            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize,
-            HttpServletRequest request
-    ) throws RemoteServiceException {
-        IPage<AdminUser> page = adminUserLogic.list(companyWechatId,companyWechatName,roleId,status,userName,pageNum, pageSize,websitId);
-        return ResponseHelper.success(page);
-    }
-
-    @GetMapping("/mch/list")
-    @ApiOperation(value = "商户账号列表")
-    public ResponseHelper<IPage<AdminCompanyWechatRespPageBean>> list(
-            @ApiParam(value = "会员帐号",required = false) @RequestParam(required = false) String userName,
-            @ApiParam(value = "用户昵称",required = false) @RequestParam(required = false) String nickName,
-            @ApiParam(value = "联系电话",required = false) @RequestParam(required = false) String linkPhone,
-            @ApiParam(value = "电子邮箱",required = false) @RequestParam(required = false) String email,
-            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNum,
-            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
-    ) throws RemoteServiceException {
-        IPage<AdminCompanyWechatRespPageBean> page = adminCompanyWechatLogic.list(userName,nickName,linkPhone,email,status,pageNum, pageSize);
-        return ResponseHelper.success(page);
-    }
-
-    @GetMapping("/mch/export")
-    @ApiOperation(value = "商户列表导出")
-    public void exportMch(
-            @ApiParam(value = "会员帐号",required = false) @RequestParam(required = false) String userName,
-            @ApiParam(value = "用户昵称",required = false) @RequestParam(required = false) String nickName,
-            @ApiParam(value = "联系电话",required = false) @RequestParam(required = false) String linkPhone,
-            @ApiParam(value = "电子邮箱",required = false) @RequestParam(required = false) String email,
-            @ApiParam(value = "状态 true:正常 false:冻结",required = false) @RequestParam(required = false) Boolean status,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        IPage<AdminCompanyWechatRespPageBean> page = adminCompanyWechatLogic.list(userName,nickName,linkPhone,email,status,1, -1);
-        ExcelData excelData = adminUserLogic.exportMch(page.getRecords());
-        ExcelUtils.exportExcel(request,response,"mch.xlsx",excelData);
-    }
-
-
-    @GetMapping("/module/list")
-    @ApiOperation(value = "功能菜单权限列表")
-    public ResponseHelper<List<AdminModuleTree>> moduleList(
-            @ApiParam(value = "用户id",required = true) @RequestParam(required = true) String adminUserId,
-            @ApiParam(value = "父级角色id") @RequestParam(required = false) String parentAdminRoleId
-    ) throws RemoteServiceException {
-        List<AdminModuleTree> adminModuleTrees = adminUserLogic.queryAdminModule(adminUserId, parentAdminRoleId);
-        return ResponseHelper.success(adminModuleTrees);
-    }
-
-    @GetMapping("/module/id/checked")
-    @ApiOperation("查询选中的功能模块ids")
-    public ResponseHelper<List<String>> queryModuleIdChecked(
-            @ApiParam(value = "角色id",required = true) @RequestParam(required = true) String adminRoleId
-    ) throws RemoteServiceException {
-        List<String> moduleIds = adminUserLogic.queryModuleIdChecked(adminRoleId);
-        return ResponseHelper.success(moduleIds);
-    }
-
-    @GetMapping("/module/all")
-    @ApiOperation(value = "全部功能菜单权限列表")
-    public ResponseHelper<List<AdminModuleTree>> allModuleList(
-            @ApiParam(value = "角色",required = true) @RequestParam(required = true) String adminRoleId,
-            HttpServletRequest request
-    ) throws RemoteServiceException {
-        List<AdminModuleTree> adminModuleTrees = adminUserLogic.queryAllAdminModuleTree(adminRoleId,request);
-        return ResponseHelper.success(adminModuleTrees);
-    }
-
-    @PostMapping("/module/grant")
-    @ApiOperation(value = "授权动能菜单权限")
-    public ResponseHelper grant(
-            @RequestBody AdminWebsitGrantBean adminWebsitGrantBean
-            ) throws RemoteServiceException {
-        adminUserLogic.grantModules(adminWebsitGrantBean);
-        return ResponseHelper.success();
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "详情")
-    public ResponseHelper<AdminUserBean> detail(
-            @ApiParam(value = "帐号id",required = true) @RequestParam(required = true) String adminUserId
-    ) throws RemoteServiceException {
-        AdminUserBean detail = adminUserLogic.detail(adminUserId);
-        return ResponseHelper.success(detail);
-    }
-
-    @PostMapping("/logout")
-    @ApiOperation("退出登录")
-    public ResponseHelper logout(HttpServletRequest request){
-        adminUserLogic.logout(request);
-        return ResponseHelper.success();
-    }
-
-    @ApiNotAuth
-    @GetMapping("/imageVerification")
-    @ApiOperation(value = "获取图片验证码")
-    public ResponseHelper<SVerification> defaultKaptcha()
-            throws Exception {
-        SVerification sVerification = adminUserLogic.defaultKaptcha();
-        return ResponseHelper.success(sVerification);
-    }
-
-//    @ApiNotAuth
-//    @PostMapping("/check-or-login/account")
-//    @ApiOperation(value = "检查账号")
-//    public ResponseHelper<ExternalMapBean> checkOrLoginAccount(
-//            @ApiParam(value = "账号",required = true) @RequestParam String account,
-//            @ApiParam(value = "密码",required = true) @RequestParam String password,
-//            @ApiParam(value = "是否检查",required = true) @RequestParam Boolean isCheck,
-//            @ApiParam(value = "时间戳",required = true) @RequestParam String timestamp,
-//            @ApiParam(value = "签名",required = true) @RequestParam String sign
-//    ) throws Exception {
-//        ExternalMapBean bean = adminUserLogic.checkOrLoginAccount(account, password, isCheck, timestamp, sign);
-//        return ResponseHelper.success(bean);
-//    }
-
-
-}

+ 0 - 60
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/OperationLogController.java

@@ -1,60 +0,0 @@
-package com.gree.mall.manager.controller.admin;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.bean.admin.AdminUserBean;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.admin.OperationLogLogic;
-import com.gree.mall.manager.plus.entity.OperationLog;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "操作日志", tags ={"操作日志"} )
-@RequestMapping(value = "/admin/operation/log", produces = "application/json; charset=utf-8")
-public class OperationLogController {
-
-    @Autowired
-    OperationLogLogic operationLogLogic;
-
-    @GetMapping("/list")
-    @ApiOperation(value = "列表")
-    public ResponseHelper<IPage<OperationLog>> list(
-            HttpServletRequest request,
-            @ApiParam(value = "模块名称",required = false) @RequestParam(required = false) String moduleName,
-            @ApiParam(value = "商户名称",required = false) @RequestParam(required = false) String companyWechatName,
-            @ApiParam(value = "账号昵称",required = false) @RequestParam(required = false) String nickName,
-            @ApiParam(value = "开始时间",required = false) @RequestParam(required = false) String startTime,
-            @ApiParam(value = "结束时间",required = false) @RequestParam(required = false) String endTime,
-            @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNo,
-            @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize
-    ) throws RemoteServiceException {
-        IPage<OperationLog> operationLogIPage = operationLogLogic.listPage(request, moduleName,companyWechatName,nickName, startTime, endTime, pageNo, pageSize);
-        return ResponseHelper.success(operationLogIPage);
-    }
-
-    @GetMapping("/module")
-    @ApiOperation(value = "所属模块")
-    public ResponseHelper<List<String>> moduleList(HttpServletRequest request){
-        return ResponseHelper.success(operationLogLogic.moduleList(request));
-    }
-
-
-    @GetMapping("/detail")
-    @ApiOperation(value = "详情")
-    public ResponseHelper<OperationLog> detail(
-            @ApiParam(value = "operationLogId",required = true) @RequestParam(required = true) String operationLogId
-    ) throws RemoteServiceException {
-        OperationLog detail = operationLogLogic.detail(operationLogId);
-        return ResponseHelper.success(detail);
-    }
-}

+ 0 - 66
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWithUserController.java

@@ -1,66 +0,0 @@
-//package com.gree.mall.manager.controller.admin.ew;
-//
-//import com.gree.mall.manager.config.aop.annotation.IsAdmin;
-//import com.gree.mall.manager.helper.ResponseHelper;
-//import com.gree.mall.manager.logic.admin.EnterpriseWechatWithUserLogic;
-//import com.gree.mall.manager.plus.entity.AdminUser;
-//import com.gree.mall.manager.plus.entity.AdminWebsit;
-//import com.gree.mall.manager.plus.entity.EnterpriseWechat;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import io.swagger.annotations.ApiParam;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.*;
-//
-//import java.util.List;
-//
-//@Api("企业微信用户管理api")
-//@RestController
-//@RequestMapping("/wechat/adminUser")
-//public class EnterpriseWechatWithUserController {
-//
-//
-//    @Autowired
-//    EnterpriseWechatWithUserLogic enterpriseWechatWithUserLogic;
-//
-//    @IsAdmin
-//    @ApiOperation("获取所有企业微信")
-//    @GetMapping("/getAllEnterpriseWechat")
-//    public ResponseHelper<List<EnterpriseWechat>> getAllEnterpriseWechat(
-//            @ApiParam(value = "企业微信id",required = false)@RequestParam(required = false) String enterpriseWechatId,
-//            @ApiParam(value = "企业微信名称",required = false)@RequestParam(required = false) String enterpriseWechatName
-//    ){
-//
-//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllEnterpriseWechat(enterpriseWechatId,enterpriseWechatName));
-//    }
-//
-//    @IsAdmin
-//    @ApiOperation("查询所有用户")
-//    @GetMapping("/getAllAdminUser")
-//    public ResponseHelper<List<AdminUser>> getAllAdminUser(
-//            @ApiParam(value = "用户id",required = false)@RequestParam(required = false) String userId,
-//            @ApiParam(value = "账号",required = false)@RequestParam(required = false) String username){
-//
-//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getAllAdminUser(userId,username));
-//    }
-//
-//    @IsAdmin
-//    @ApiOperation("通过用户id查寻其绑定的企业微信")
-//    @GetMapping("/getWebsitIdsByAdminUserId")
-//    public ResponseHelper<List<AdminWebsit>> getWebsitIdsByAdminUserId(
-//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId){
-//
-//        return ResponseHelper.success(enterpriseWechatWithUserLogic.getEnterpriseWechatIdsByAdminUserId(adminUserId));
-//    }
-//
-//    @IsAdmin
-//    @ApiOperation("变更用户与企业绑定关系")
-//    @PostMapping("/updateAdminUserWebsit")
-//    public ResponseHelper<Void> updateAdminUserWebsit(
-//            @ApiParam(value = "用户id",required = true)@RequestParam(required = true)String adminUserId,
-//            @ApiParam(value = "新的企业id 格式 enterpriseWechat1,格式enterpriseWechat2  固定清除旧的关联 添加新的关联",required = false)
-//            @RequestParam(required = false) String newEnterpriseWechats){
-//        enterpriseWechatWithUserLogic.updateEnterpriseWechatWithUser(adminUserId,newEnterpriseWechats);
-//        return ResponseHelper.success();
-//    }
-//}

+ 0 - 161
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/admin/ew/EnterpriseWechatWorkerController.java

@@ -1,161 +0,0 @@
-//package com.gree.mall.manager.controller.admin.ew;
-//
-//import com.baomidou.mybatisplus.core.metadata.IPage;
-//import com.gree.mall.manager.bean.ExcelData;
-//import com.gree.mall.manager.bean.admin.AdminUserCom;
-//import com.gree.mall.manager.exception.RemoteServiceException;
-//import com.gree.mall.manager.helper.ResponseHelper;
-//import com.gree.mall.manager.logic.admin.ew.EnterpriseWechatWorkerLogic;
-//import com.gree.mall.manager.logic.common.CommonLogic;
-//import com.gree.mall.manager.plus.entity.EnterpriseWechatWorker;
-//import com.gree.mall.manager.utils.CommonUtils;
-//import com.gree.mall.manager.utils.excel.ExcelUtils;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import io.swagger.annotations.ApiParam;
-//import lombok.extern.slf4j.Slf4j;
-//import me.chanjar.weixin.common.error.WxErrorException;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.*;
-//import org.springframework.web.multipart.MultipartFile;
-//
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//import javax.validation.constraints.NotBlank;
-//import javax.validation.constraints.NotEmpty;
-//import javax.validation.constraints.NotNull;
-//import java.io.IOException;
-//import java.util.List;
-//
-//@Slf4j
-//@RestController
-//@Api(value = "企业微信成员管理API", tags ={"企业微信成员管理API"} )
-//@RequestMapping(value = "/wechat/enterprise", produces = "application/json; charset=utf-8")
-//public class EnterpriseWechatWorkerController {
-//
-//    @Autowired
-//    EnterpriseWechatWorkerLogic enterpriseWechatWorkerLogic;
-//    @Autowired
-//    CommonLogic commonLogic;
-//
-//    @GetMapping("/list")
-//    @ApiOperation("成员列表")
-//    public ResponseHelper<IPage<EnterpriseWechatWorker>> list(
-//           @ApiParam(value = "keyword",required = false) @RequestParam(required = false) String keyword,
-//           @ApiParam(value = "网点主键",required = false) @RequestParam(required = false) String adminWebsitId,
-//           @ApiParam(value = "网点id",required = false) @RequestParam(required = false) Long websitId,
-//           @ApiParam(value = "页号",required = true) @RequestParam(required = true) Integer pageNo,
-//           @ApiParam(value = "页大小",required = true) @RequestParam(required = true) Integer pageSize,
-//           HttpServletRequest request
-//    ){
-//        IPage<EnterpriseWechatWorker> list = enterpriseWechatWorkerLogic.list(keyword, adminWebsitId,websitId, pageNo, pageSize,request);
-//        return ResponseHelper.success(list);
-//    }
-//
-//    //String name,String wechatUserId,String position,String mobile,Integer gender,Long mainDepartmentId,String email
-//    @PostMapping("/add")
-//    @ApiOperation("新增")
-//    public ResponseHelper add(
-//            @ApiParam(value = "名称",required = true) @RequestParam(required = true) String name,
-//            @ApiParam(value = "帐号",required = true) @RequestParam(required = true) String wechatUserId,
-//            @ApiParam(value = "职位",required = true) @RequestParam(required = true) String position,
-//            @ApiParam(value = "手机号",required = true) @RequestParam(required = true) String mobile,
-//            @ApiParam(value = "性别(1=男 2=女 0=未知)",required = true) @RequestParam(required = true) Integer gender,
-//            @ApiParam(value = "部门id",required = true) @RequestParam(required = true) Long mainDepartmentId,
-//            @ApiParam(value = "邮箱",required = true) @RequestParam(required = true) String email,
-//            HttpServletRequest request
-//    ) throws RemoteServiceException, WxErrorException {
-//        AdminUserCom adminUser = commonLogic.getAdminUser(request);
-//        enterpriseWechatWorkerLogic.add(name,wechatUserId,position,mobile,gender,mainDepartmentId,email,adminUser.getAdminCompanyWechat());
-//        return ResponseHelper.success();
-//    }
-//
-//    @PostMapping("/update")
-//    @ApiOperation("修改")
-//    public ResponseHelper update(
-//            @ApiParam(value = "id",required = true) @RequestParam(required = true) Integer id,
-//            @ApiParam(value = "名称",required = false) @RequestParam(required = false) String name,
-//            @ApiParam(value = "帐号",required = false) @RequestParam(required = false) String wechatUserId,
-//            @ApiParam(value = "职位",required = false) @RequestParam(required = false) String position,
-//            @ApiParam(value = "手机号",required = false) @RequestParam(required = false) String mobile,
-//            @ApiParam(value = "性别(1=男 2=女 0=未知)",required = true) @RequestParam(required = false) Integer gender,
-//            @ApiParam(value = "部门id",required = false) @RequestParam(required = false) Long mainDepartmentId,
-//            @ApiParam(value = "邮箱",required = false) @RequestParam(required = false) String email,
-//            HttpServletRequest request
-//    ) throws RemoteServiceException, WxErrorException {
-//        enterpriseWechatWorkerLogic.update(id,name,wechatUserId,position,mobile,gender,mainDepartmentId,email,request);
-//        return ResponseHelper.success();
-//    }
-//
-//    @PostMapping("/delete")
-//    @ApiOperation("删除")
-//    public ResponseHelper delete(
-//            @RequestParam List<Integer> id,
-//            HttpServletRequest request
-//    ) throws WxErrorException {
-//        enterpriseWechatWorkerLogic.delete(id,request);
-//        return ResponseHelper.success();
-//    }
-//
-//    @PostMapping("/excelDelete")
-//    @ApiOperation("/导入删除")
-//    public ResponseHelper<Void> loadDelete(
-//            @RequestParam("file")MultipartFile file,
-//            HttpServletRequest request
-//    ) throws IOException, WxErrorException {
-//
-//        enterpriseWechatWorkerLogic.loadDelete(file,request);
-//        return ResponseHelper.success();
-//    }
-//
-//    @GetMapping("/downloadDeleteExcel")
-//    @ApiOperation("下载导入删除模板")
-//    public void downloadDeleteExcel(
-//            HttpServletResponse response
-//    ) throws Exception {
-//        CommonUtils.downloadFile("/template/down_load_delete.xlsx",response);
-//    }
-//
-//
-//    @GetMapping("/detail")
-//    @ApiOperation("详情")
-//    public ResponseHelper<EnterpriseWechatWorker> detail(@RequestParam Integer id) throws WxErrorException {
-//        EnterpriseWechatWorker detail = enterpriseWechatWorkerLogic.detail(id);
-//        return ResponseHelper.success(detail);
-//    }
-//
-//    @GetMapping("/export")
-//    @ApiOperation("导出")
-//    public void exportData(
-//            @ApiParam(value = "keyword",required = false) @RequestParam(required = false) String keyword,
-//            @ApiParam(value = "网点主键",required = false) @RequestParam(required = false) String adminWebsitId,
-//            @ApiParam(value = "网点id",required = false) @RequestParam(required = false) Long websitId,
-//            HttpServletRequest request,
-//            HttpServletResponse response
-//    ) throws Exception {
-//        ExcelData excelData = enterpriseWechatWorkerLogic.exportData(request, keyword, adminWebsitId,websitId);
-//        ExcelUtils.exportExcel(request,response,"成员.xlsx",excelData);
-//    }
-//
-//
-//    @PostMapping("/import")
-//    @ApiOperation("导入")
-//    public ResponseHelper importData(
-//            @ApiParam(value = "附件",required = true) @RequestParam(required = true) MultipartFile file,
-//            @ApiParam(value = "部门id",required = true) @RequestParam(required = true) Long mainDepartmentId,
-//            HttpServletRequest request
-//    ) throws Exception {
-//        List<Object> datas = ExcelUtils.importExcel(file);
-//        String s = enterpriseWechatWorkerLogic.importData(datas, mainDepartmentId,request);
-//        return ResponseHelper.success(s);
-//    }
-//
-//    @GetMapping("/download")
-//    @ApiOperation("下载模板")
-//    public void download(
-//            HttpServletResponse response
-//    ) throws Exception {
-//        CommonUtils.downloadFile("/template/wechat_user.xlsx",response);
-//    }
-//
-//}

+ 0 - 203
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/ChargingStandardController.java

@@ -1,203 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.ExcelData;
-import com.gree.mall.manager.bean.charging.ChargingStandardBean;
-import com.gree.mall.manager.bean.listvo.ChargingStandard2VO;
-import com.gree.mall.manager.bean.listvo.ChargingStandardTypeVO;
-import com.gree.mall.manager.bean.listvo.ChargingStandardVO;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.charging.ChargingStandardLogic;
-import com.gree.mall.manager.plus.entity.ChargingStandard;
-import com.gree.mall.manager.plus.entity.ChargingStandardType;
-import com.gree.mall.manager.utils.CommonUtils;
-import com.gree.mall.manager.utils.excel.ExcelUtils;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.List;
-
-@Slf4j
-@RestController
-@Api(value = "收费标准和故障排查API", tags ={"收费标准和故障排查API"} )
-@RequestMapping(value = "/charging/standard", produces = "application/json; charset=utf-8")
-public class ChargingStandardController {
-
-    @Autowired
-    ChargingStandardLogic chargingStandardLogic;
-
-
-    @ZfireList
-    @PostMapping("/type/list2")
-    @ApiOperation("收费标准类型-列表v2")
-    public ResponseHelper<IPage<ChargingStandardTypeVO>> typeList2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<ChargingStandardTypeVO> chargingStandardTypeVOIPage = chargingStandardLogic.listType2(zfireParamBean);
-        return ResponseHelper.success(chargingStandardTypeVOIPage, new TypeReference<ChargingStandardTypeVO>() {});
-    }
-
-
-    @GetMapping("/type/list")
-    @ApiOperation("收费标准类型-列表")
-    public ResponseHelper<List<ChargingStandardType>> typeList(){
-        List<ChargingStandardType> chargingStandardTypes = chargingStandardLogic.listType();
-        return ResponseHelper.success(chargingStandardTypes);
-    }
-
-    @PostMapping("/type/save")
-    @ApiOperation("收费标准类型-保存")
-    public ResponseHelper saveType(
-            @RequestBody ChargingStandardType chargingStandardType,
-            HttpServletRequest request
-    ){
-        chargingStandardLogic.saveType(chargingStandardType,request);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/type/delete")
-    @ApiOperation("收费标准类型-删除")
-    public ResponseHelper deleteType(
-            @RequestParam String id,
-            HttpServletRequest request
-    ){
-        chargingStandardLogic.deleteType(id);
-        return ResponseHelper.success();
-    }
-
-    @GetMapping("/type/detail")
-    @ApiOperation("收费标准类型-详情")
-    public ResponseHelper<ChargingStandardType> saveType(
-            @RequestParam String id
-    ){
-        ChargingStandardType chargingStandardType = chargingStandardLogic.detailType(id);
-        return ResponseHelper.success(chargingStandardType);
-    }
-
-
-    @GetMapping("/list")
-    @ApiOperation("收费标准/故障排查-列表")
-    public ResponseHelper<ChargingStandardBean> list(
-            @ApiParam("1=收费标准 2=故障排查") @RequestParam Integer type,
-            @ApiParam(value = "状态true=正常 false=禁用",required = false) @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "品牌id",required = false) @RequestParam(required = false) String brandId,
-            @ApiParam(value = "一级分类id",required = false) @RequestParam(required = false) String oneCategoryId,
-            @ApiParam(value = "二级分类id",required = false) @RequestParam(required = false) String twoCategoryId,
-            @ApiParam(value = "二级分类id",required = false) @RequestParam(required = false) String content1,
-            @RequestParam Integer pageNum,
-            @RequestParam Integer pageSize
-    ){
-        IPage<ChargingStandardBean> list = chargingStandardLogic
-                .list(type,status,brandId,oneCategoryId,twoCategoryId,content1,pageNum, pageSize);
-        return ResponseHelper.success(list);
-    }
-
-    @ZfireList
-    @PostMapping("/list2")
-    @ApiOperation("收费标准V2-列表")
-    public ResponseHelper<IPage<ChargingStandardVO>> list2(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<ChargingStandardVO> chargingStandardVOIPage = chargingStandardLogic.list2(zfireParamBean);
-        return ResponseHelper.success(chargingStandardVOIPage, new TypeReference<ChargingStandardVO>(){});
-    }
-
-    @ZfireList
-    @PostMapping("/list3")
-    @ApiOperation("故障现象V2-列表")
-    public ResponseHelper<IPage<ChargingStandard2VO>> list3(
-            @RequestBody ZfireParamBean zfireParamBean
-    ){
-        IPage<ChargingStandard2VO> chargingStandardVOIPage = chargingStandardLogic.list3(zfireParamBean);
-        return ResponseHelper.success(chargingStandardVOIPage, new TypeReference<ChargingStandard2VO>(){});
-    }
-
-    @PostMapping("/list3/pageExport")
-    @ApiOperation("故障现象V2-导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<ChargingStandard2VO> list = chargingStandardLogic.list3(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(list.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-
-    @PostMapping("/save")
-    @ApiOperation("收费标准/故障排查-保存")
-    public ResponseHelper save(
-            @RequestBody ChargingStandard chargingStandard,
-            HttpServletRequest request
-    ){
-        chargingStandardLogic.save(chargingStandard,request);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("/delete")
-    @ApiOperation("收费标准/故障排查-删除")
-    public ResponseHelper delete(
-            @RequestParam String id,
-            HttpServletRequest request
-    ){
-        chargingStandardLogic.delete(id);
-        return ResponseHelper.success();
-    }
-
-    @GetMapping("/detail")
-    @ApiOperation("收费标准/故障排查-详情")
-    public ResponseHelper<ChargingStandardBean> detail(
-            @RequestParam String id
-    ){
-        ChargingStandardBean detail = chargingStandardLogic.detail(id);
-        return ResponseHelper.success(detail);
-    }
-
-
-    @GetMapping("/download")
-    @ApiOperation("故障排查-下载")
-    public void download(HttpServletResponse response) throws IOException {
-        CommonUtils.downloadFile("故障排查.xlsx",response);
-    }
-
-
-    @PostMapping("/import")
-    @ApiOperation("故障排查-导入")
-    public ResponseHelper importData(@RequestParam MultipartFile file) throws IOException {
-        chargingStandardLogic.importData(file);
-        return ResponseHelper.success();
-    }
-
-
-    @GetMapping("/exportData")
-    @ApiOperation("收费标准/故障排查-列表")
-    public void exportData(
-            @ApiParam("1=收费标准 2=故障排查") @RequestParam Integer type,
-            @ApiParam(value = "状态true=正常 false=禁用",required = false) @RequestParam(required = false) Boolean status,
-            @ApiParam(value = "品牌id",required = false) @RequestParam(required = false) String brandId,
-            @ApiParam(value = "一级分类id",required = false) @RequestParam(required = false) String oneCategoryId,
-            @ApiParam(value = "二级分类id",required = false) @RequestParam(required = false) String twoCategoryId,
-            @ApiParam(value = "二级分类id",required = false) @RequestParam(required = false) String content1,
-            HttpServletRequest request,
-            HttpServletResponse response
-    ) throws Exception {
-        IPage<ChargingStandardBean> list = chargingStandardLogic.list(type,status,brandId,oneCategoryId,twoCategoryId,content1,1, -1);
-        ExcelData excelData = chargingStandardLogic.exportData(list.getRecords());
-        ExcelUtils.exportExcel(request,response,"info.xlsx",excelData);
-    }
-
-
-}

+ 0 - 159
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CompanyRecordController.java

@@ -1,159 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.beust.jcommander.Parameter;
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.common.AmityUrlVO;
-import com.gree.mall.manager.bean.common.ImgCarouselManageBean;
-import com.gree.mall.manager.enums.IsYesNoEnum;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.CompanyRecordLogic;
-import com.gree.mall.manager.plus.entity.AmityUrl;
-import com.gree.mall.manager.plus.entity.CompanyRecordManage;
-import com.gree.mall.manager.plus.entity.ImgCarouselManage;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import io.swagger.annotations.Api;
-
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-
-@Slf4j
-@RestController
-@Api(value = "轮播图API", tags ={"轮播图API"} )
-@RequestMapping(value = "/record", produces = "application/json; charset=utf-8")
-public class CompanyRecordController {
-
-    @Autowired
-    CompanyRecordLogic companyRecordLogic;
-
-    @PostMapping("company/add")
-    @ApiOperation(value = "新增公司备案信息")
-    public ResponseHelper addRecordCompany(@RequestBody CompanyRecordManage companyRecordManage) {
-        companyRecordLogic.addRecordCompany(companyRecordManage);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("company/update")
-    @ApiOperation(value = "修改")
-    public ResponseHelper editRecordCompany(@RequestBody CompanyRecordManage companyRecordManage) {
-        companyRecordLogic.editRecordCompany(companyRecordManage);
-        return ResponseHelper.success();
-    }
-
-    @ApiNotAuth
-    @GetMapping("company/list")
-    @ApiOperation(value = "公司列表")
-    public ResponseHelper<List<CompanyRecordManage>> companyRecordList() {
-        List<CompanyRecordManage> companyRecordManage = companyRecordLogic.companyRecordList();
-        return ResponseHelper.success(companyRecordManage);
-    }
-
-    @ApiNotAuth
-    @GetMapping("company/detail")
-    @ApiOperation(value = "查询")
-    public ResponseHelper<CompanyRecordManage> getCompany(@RequestParam String id) {
-        CompanyRecordManage imgCarouselManage = companyRecordLogic.getCompany(id);
-        return ResponseHelper.success(imgCarouselManage);
-    }
-
-    @PostMapping("carousel/add")
-    @ApiOperation(value = "新增轮播图信息")
-    public ResponseHelper addImgCarousel(@RequestBody ImgCarouselManage imgCarouselManage) {
-        companyRecordLogic.addImgCarousel(imgCarouselManage);
-        return ResponseHelper.success();
-    }
-
-    @ApiNotAuth
-    @GetMapping("list")
-    @ApiOperation(value = "轮播图列表")
-    public ResponseHelper<List<ImgCarouselManage>> list() {
-        List<ImgCarouselManage> adminRoleIPage = companyRecordLogic.list();
-        return ResponseHelper.success(adminRoleIPage);
-    }
-
-    @PostMapping("delete")
-    @ApiOperation(value = "批量删除轮播图")
-    public ResponseHelper delete(@RequestParam List<String> ids) {
-        companyRecordLogic.delete(ids);
-        return ResponseHelper.success();
-    }
-
-    @ApiNotAuth
-    @GetMapping("detail")
-    @ApiOperation(value = "查询")
-    public ResponseHelper<ImgCarouselManage> get(@RequestParam String id) {
-        ImgCarouselManage imgCarouselManage = companyRecordLogic.detail(id);
-        return ResponseHelper.success(imgCarouselManage);
-    }
-
-    @PostMapping("update")
-    @ApiOperation(value = "修改")
-    public ResponseHelper update(@RequestBody ImgCarouselManageBean imgCarouselManage) {
-        companyRecordLogic.update(imgCarouselManage);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("updateImgStatus")
-    @ApiOperation(value = "轮播图显示与隐藏")
-    public ResponseHelper weatherShow(@RequestParam String id) {
-        companyRecordLogic.updateStatus(id);
-        return ResponseHelper.success();
-    }
-
-
-    @PostMapping("amity/add")
-    @ApiOperation(value = "友情链接-新增")
-    public ResponseHelper addAmity(@RequestBody AmityUrl amityUrl) {
-        companyRecordLogic.addAmity(amityUrl);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("amity/update")
-    @ApiOperation(value = "友情链接-修改")
-    public ResponseHelper updateAmity(@RequestBody AmityUrl amityUrl) {
-        companyRecordLogic.updateAmity(amityUrl);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("amity/delete")
-    @ApiOperation(value = "友情链接-批量删除")
-    public ResponseHelper deleteAmity(@RequestParam List<String> amityUrlIds) {
-        companyRecordLogic.deleteAmity(amityUrlIds);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("amity/status")
-    @ApiOperation(value = "友情链接-状态 有效/无效")
-    public ResponseHelper amityStatus(@RequestParam String amityUrlId, @ApiParam(required = true, value = "YES NO") @RequestParam IsYesNoEnum status) {
-        companyRecordLogic.amityStatus(amityUrlId, status);
-        return ResponseHelper.success();
-    }
-
-    @ApiNotAuth
-    @ZfireList
-    @PostMapping("amity/list")
-    @ApiOperation(value = "友情链接-列表")
-    public ResponseHelper<IPage<AmityUrlVO>> amityList(@RequestBody ZfireParamBean zfireParamBean) {
-        IPage<AmityUrlVO> list = companyRecordLogic.amityList(zfireParamBean);
-        return ResponseHelper.success(list, new TypeReference<AmityUrlVO>() {
-        });
-    }
-
-    @ApiNotAuth
-    @PostMapping("amity/list2")
-    @ApiOperation(value = "友情链接-列表")
-    public ResponseHelper<List<AmityUrl>> amityList() {
-        List<AmityUrl> amityUrls = companyRecordLogic.list2();
-        return ResponseHelper.success(amityUrls);
-    }
-
-}

+ 0 - 115
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/CryptTool.java

@@ -1,115 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-import org.apache.commons.codec.DecoderException;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.codec.binary.Hex;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import javax.crypto.*;
-import javax.crypto.spec.SecretKeySpec;
-import java.io.UnsupportedEncodingException;
-import java.security.*;
-
-public class CryptTool {
-    public CryptTool() {
-    }
-
-    public static String byte2hex(byte[] b) {
-        StringBuffer stringBuffer = new StringBuffer();
-        String temp = null;
-
-        for(int i = 0; i < b.length; ++i) {
-            temp = Integer.toHexString(b[i] & 255);
-            if (temp.length() == 1) {
-                stringBuffer.append("0").append(temp);
-            } else {
-                stringBuffer.append(temp);
-            }
-        }
-
-        return stringBuffer.toString();
-    }
-
-    public static byte[] decodeBase64(String key) {
-        return Base64.decodeBase64(key);
-    }
-
-    public static SecretKeySpec initAESSecretKey(String secretKeySource) throws NoSuchAlgorithmException, DecoderException, UnsupportedEncodingException {
-        KeyGenerator keyGen = KeyGenerator.getInstance("AES");
-        SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG");
-        byte[] decodeHex = Hex.decodeHex(sha256(secretKeySource).toCharArray());
-        secureRandom.setSeed(decodeHex);
-        keyGen.init(128, secureRandom);
-        SecretKey secretKey = keyGen.generateKey();
-        byte[] secretKeyEncoded = secretKey.getEncoded();
-        SecretKeySpec key = new SecretKeySpec(secretKeyEncoded, "AES");
-        Security.addProvider(new BouncyCastleProvider());
-        return key;
-    }
-
-    public static String decryptAES(String source, String secretKey) {
-        try {
-            byte[] sourceBytes = decodeBase64(source);
-            SecretKeySpec secretKeySpec = initAESSecretKey(secretKey);
-            byte[] decryptBytes = decrypt(source.getBytes(), secretKeySpec);
-            return new String(decryptBytes, "utf8");
-        } catch (Exception var5) {
-            throw new RuntimeException("AES算法解密失败", var5);
-        }
-    }
-
-    private static byte[] decrypt(byte[] source, SecretKeySpec secretKeySpec) throws NoSuchPaddingException, NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException, InvalidKeyException {
-        Cipher cipher = Cipher.getInstance(secretKeySpec.getAlgorithm());
-        cipher.init(2, secretKeySpec);
-        return cipher.doFinal(source);
-    }
-
-    public static String digest(byte[] inputBytes, String algorithm) throws NoSuchAlgorithmException {
-        String outputStr = null;
-        MessageDigest alg = MessageDigest.getInstance(algorithm);
-        alg.update(inputBytes);
-        byte[] digest = alg.digest();
-        outputStr = byte2hex(digest);
-        return outputStr.toUpperCase();
-    }
-
-    public static String sha1(String inStr) throws UnsupportedEncodingException, NoSuchAlgorithmException {
-        String outStr = digest(inStr.getBytes("UTF-8"), "SHA-1");
-        return outStr;
-    }
-
-    public static String sha256(String inStr) throws UnsupportedEncodingException, NoSuchAlgorithmException {
-        String outStr = digest(inStr.getBytes("UTF-8"), "SHA-256");
-        return outStr;
-    }
-
-    public static String md5(String inStr) throws UnsupportedEncodingException, NoSuchAlgorithmException {
-        String outStr = digest(inStr.getBytes("UTF-8"), "MD5");
-        return outStr;
-    }
-
-    public static String encryptBASE64(byte[] key) throws Exception {
-        return Base64.encodeBase64String(key);
-    }
-
-    public static String encryptAES(String source, String secretKey) {
-        try {
-            byte[] sourceBytes = source.getBytes("utf8");
-            SecretKeySpec secretKeySpec = initAESSecretKey(secretKey);
-            byte[] encryptBytes = encrypt(sourceBytes, secretKeySpec);
-            return Base64.encodeBase64URLSafeString(encryptBytes);
-        } catch (Exception var5) {
-            throw new RuntimeException("AES算法加密失败", var5);
-        }
-    }
-
-    private static byte[] encrypt(byte[] source, SecretKeySpec secretKeySpec) throws BadPaddingException, IllegalBlockSizeException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException {
-        Cipher cipher = Cipher.getInstance(secretKeySpec.getAlgorithm());
-        cipher.init(1, secretKeySpec);
-        return cipher.doFinal(source);
-    }
-
-    public static String encodeBase64String(byte[] source) {
-        return Base64.encodeBase64String(source);
-    }
-}

+ 0 - 609
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/GreeLogic.java

@@ -1,609 +0,0 @@
-/*
-package com.gree.mall.manager.controller.common;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.aliyuncs.utils.StringUtils;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gree.mall.manager.bean.CommonParam;
-import com.gree.mall.manager.bean.OutAppDefaultReq;
-import com.gree.mall.manager.constant.Constant;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.GreeResponseHelper;
-import com.gree.mall.manager.logic.common.CommonLogic;
-import com.gree.mall.manager.utils.RedisUtil;
-import com.gree.mall.manager.utils.http.HttpUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Service;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.HttpStatusCodeException;
-import org.springframework.web.client.RestTemplate;
-
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-*/
-/**
- * 格力总部接口*//*
-
-
-
-@Slf4j
-@Service
-public class GreeLogic {
-
-    @Value("${gree.V3.gettoken}")
-    private String tokenUrl;
-    @Value("${gree.check.barcode}")
-    private String checkBarcodeUrl;
-    @Value("${gree.repair.settle.get}")
-    private String getRepairSettleUrl;
-    @Value("${gree.repair.settle.do}")
-    private String doRepairSettleUrl;
-    @Value("${gree.client.id}")
-    private String clientId;
-    @Value("${gree.V3.client.secert}")
-    private String clientSecert;
-    @Value("${gree.api.url}")
-    private String apiUrl;
-    @Value("${gree.gz.appid}")
-    private String gzAppId;
-    @Value("${gree.gz.appkey}")
-    private String gzAppKey;
-    @Value("${gree.fs.appid}")
-    private String fsAppId;
-    @Value("${gree.fs.appkey}")
-    private String fsAppKey;
-//    @Value("${gree.cloud.api.url}")
-//    private String cloudApiUrl;
-    @Value("${gree.V3.api.url}")
-    private String v3ApiUrl;
-    @Value("${gree.V3.gettoken}")
-    private String v3TokenUrl;
-    @Value("${gree.V3.client.secert}")
-    private String v3ClientSecert;
-    @Value("${gree.url}")
-    private String apiUrlFeedBack;
-
-    @Autowired
-    RedisUtil redisUtil;
-    @Autowired
-    CommonLogic commonLogic;
-
-    public String getAppId(Integer belongType){
-        if(belongType == 1){
-            return gzAppId;
-        }else{
-            return fsAppId;
-        }
-    }
-
-    public String getAppKey(Integer belongType){
-        if(belongType == 1){
-            return gzAppKey;
-        }else{
-            return fsAppKey;
-        }
-    }
-
-*/
-/**
-     * 获取总部接口的请求token
-     * @return
-     * @throws RemoteServiceException*//*
-
-
-
-    public String getAccessToken() throws RemoteServiceException {
-        String redisKey = Constant.RedisPrefix.TOKEN_GREE;
-        String token = (String)redisUtil.get(redisKey);
-        if(token != null){
-            return token;
-        }
-        MultiValueMap<String, String> forms= new LinkedMultiValueMap<String, String>();
-
-        forms.put("client_id", Collections.singletonList(clientId));
-        forms.put("client_secret", Collections.singletonList(clientSecert));
-        forms.put("grant_type", Collections.singletonList("client_credentials"));
-        String s = HttpUtils.requestXwww(tokenUrl, forms);
-        //String s = HttpUtils.requestPostForm(tokenUrl, map, null);
-        log.info("【获取总部token】response:{}",s);
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        String accessToken = jsonObject.getString("access_token");
-        if(StringUtils.isNotEmpty(accessToken)) {
-            redisUtil.set(Constant.RedisPrefix.TOKEN_GREE, accessToken, 2 * 60 * 60);
-        }
-        return accessToken;
-    }
-
-*/
-/**
-     * 获取总部接口的请求token
-     * @return
-     * @throws RemoteServiceException*//*
-
-
-
-    public String getAccessTokenV3() throws RemoteServiceException {
-        String redisKey = Constant.RedisPrefix.TOKEN_GREE_V3;
-        String token = (String)redisUtil.get(redisKey);
-//        if(token != null){
-//            return token;
-//        }
-        MultiValueMap<String, String> forms= new LinkedMultiValueMap<String, String>();
-
-        forms.put("client_id", Collections.singletonList(clientId));
-        forms.put("client_secret", Collections.singletonList(v3ClientSecert));
-
-        forms.put("grant_type", Collections.singletonList("client_credentials"));
-        String s = HttpUtils.requestXwww(v3TokenUrl, forms);
-        //String s = HttpUtils.requestPostForm(tokenUrl, map, null);
-        log.info("【获取总部token】response:{}",s);
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        String accessToken = jsonObject.getString("access_token");
-        if(StringUtils.isNotEmpty(accessToken)) {
-            redisUtil.set(Constant.RedisPrefix.TOKEN_GREE_V3, accessToken, 2 * 60 * 60);
-        }
-        return accessToken;
-    }
-
-
-
-
-
-
-*/
-/**
-     *   获取销司结算标准
-     * @param jxbh 机型编号,条码前五位
-     * @param wxxmh 维修项目号
-     * @param gmrg 购买日期(yyyy-MM-dd)
-     * @param wxlx 维修类型
-     * @param spid 大类
-     *//*
-
-
-    public String getRepairSettle(String jxbh,String wxxmh,String gmrg,String wxlx,String spid){
-        try {
-            Map<String, Object> map = new HashMap<>();
-            map.put("jxbh", jxbh);
-            map.put("wxxmh", wxxmh);
-            map.put("gmrg", gmrg);
-            map.put("wxlx", wxlx);
-            map.put("spid", spid);
-            map.put("clientid", clientId);
-
-            JSONObject jsonObject = this.post(getRepairSettleUrl, map);
-            return JSONObject.toJSONString(jsonObject.get("data"));
-        }catch(Exception e){
-            log.error("获取销司结算标准失败",e);
-            return "";
-        }
-
-    }
-
-
-*/
-/**
-     *   批量转结算
-     * @param ids 多个逗号隔开
-     *//*
-
-
-    public String doRepairSettle(String ids){
-        try {
-
-            Map<String,Object> map = new HashMap<>();
-            map.put("wxjsguids",ids);
-            map.put("clientid",clientId);
-
-            JSONObject jsonObject = this.post(doRepairSettleUrl, map);
-            return JSONObject.toJSONString(jsonObject.get("data"));
-        }catch(Exception e){
-            log.error("【对接总部】批量转结算失败",e.getMessage());
-        }
-        return null;
-    }
-
-*/
-/**
-     * 请求总部接口
-     * @return*//*
-
-
-
-  public String post(String apiPath,Map<String,Object> bizContent,Integer belongType) throws Exception {
-        CommonParam commonParam = new CommonParam();
-        commonParam.setAppId(this.getAppId(belongType));
-        commonParam.setAppKey(this.getAppKey(belongType));
-        commonParam.setAppPath(apiPath);
-        commonParam.setJson(JSONObject.toJSONString(bizContent));
-        OutAppDefaultReq outAppDefaultReq = commonLogic.supplyParam(commonParam);
-        Map<String,String> header = new HashMap<>();
-        header.put("authorization","Bearer "+this.getAccessToken());
-        //log.info("accessToken:{}", "Bearer "+this.getAccessToken());
-
-        log.info("【请求总部接口】request:{}",JSONObject.toJSONString(outAppDefaultReq));
-        String s = HttpUtils.requestPostBody(apiUrl, JSONObject.toJSONString(outAppDefaultReq), header);
-        log.info("【请求总部接口】response:{}",s);
-        GreeResponseHelper greeResponseHelper = JSONObject.parseObject(s, GreeResponseHelper.class);
-        if(greeResponseHelper.getStatus() != 200){
-            throw new RemoteServiceException("对接失败总部接口失败:"+greeResponseHelper.getMsg());
-        }
-        return (String)greeResponseHelper.getData();
-    }
-
-
-    public JSONObject post(String url,List param){
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessToken());
-        log.info("【总部接口对接】request:{}",  JSON.toJSONString(param));
-        String s = HttpUtils.requestPostBody(url, JSON.toJSONString(param), header);
-        log.info("【总部接口对接】response:{}",s);
-
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        Integer statusCode = jsonObject.getInteger("status");
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-            return null;
-        }
-        return jsonObject;
-    }
-
-*/
-/**
-     * post请求,用3.0的token
-     * @param url
-     * @param param
-     * @return*//*
-
-
-
-    public JSONObject postV3(String url,List param){
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessTokenV3());
-        log.info("【总部接口对接】request:{}",  JSON.toJSONString(param));
-        String s = HttpUtils.requestPostBody(url, JSON.toJSONString(param), header);
-        log.info("【总部接口对接】response:{}",s);
-
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        Integer statusCode = jsonObject.getInteger("status");
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-            return null;
-        }
-        return jsonObject;
-    }
-
-    private JSONObject post(String url,Map<String,Object> map){
-        Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessToken());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-        String s = HttpUtils.requestPostBody(url, JSONObject.toJSONString(map), header);
-        log.info("【总部接口对接】response:{}",s);
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        Integer statusCode = jsonObject.getInteger("statusCode");
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-            return null;
-        }
-        return jsonObject;
-    }
-
-    public JSONObject postPub(String url,Map<String,Object> map) throws IOException {
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessToken());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-        JSONObject jsonObject = new JSONObject();
-    	String s = HttpUtils.requestPostBodyIO(url, JSONObject.toJSONString(map), header);
-        log.info("【总部接口对接】response:{}",s);
-        jsonObject = JSONObject.parseObject(s);
-
-        Integer statusCode = (jsonObject.containsKey("status") && null != jsonObject.get("status") ) ?
-        		jsonObject.getInteger("status") : jsonObject.getInteger("statusCode");
-        jsonObject.put("status", statusCode);
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-        }
-        return jsonObject;
-    }
-
-
-    public JSONObject postPubV3(String url,Map<String,Object> map) throws IOException {
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessTokenV3());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-        JSONObject jsonObject = new JSONObject();
-    	String s = HttpUtils.requestPostBodyIO(url, JSONObject.toJSONString(map), header);
-        log.info("【总部接口对接】response:{}",s);
-        jsonObject = JSONObject.parseObject(s);
-
-        Integer statusCode = (jsonObject.containsKey("status") && null != jsonObject.get("status") ) ?
-        		jsonObject.getInteger("status") : jsonObject.getInteger("statusCode");
-        jsonObject.put("status", statusCode);
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-        }
-        return jsonObject;
-    }
-
-    public Object get(String url,Map<String,String> map) throws JsonMappingException, JsonProcessingException {
-    	final String apiPath = v3ApiUrl;
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessTokenV3());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-//        String s = HttpUtils.requestPostBody(url, JSONObject.toJSONString(map), header);
-        String s = HttpUtils.requestGet(apiPath+url, map, header);
-        log.info("【总部接口对接】response:{}",s);
-        ObjectMapper mapper = new ObjectMapper();
-		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-        ResponseExHelper responseHelper = mapper.readValue(s, ResponseExHelper.class);
-        if(responseHelper.getStatusCode() != 200){
-            throw new RemoteServiceException("对接失败总部接口失败:"+responseHelper.getMessage());
-        }
-        return responseHelper.getData();
-    }
-
-    public JSONObject getPub(String url,Map<String,String> map) {
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessToken());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-        String s = com.gree.settlement.api.utils.HttpUtils.requestGet(url, map, header);
-        log.info("【总部接口对接】response:{}",s);
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        Integer statusCode = jsonObject.getInteger("status");
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-            return null;
-        }
-        return jsonObject;
-    }
-
-
-    public JSONObject getPubV3(String url,Map<String,String> map) {
-    	Map<String, String> header = new HashMap<>();
-        header.put("authorization", "Bearer " + this.getAccessTokenV3());
-        log.info("【总部接口对接】request:{}",JSONObject.toJSONString(map));
-        String s = com.gree.settlement.api.utils.HttpUtils.requestGet(url, map, header);
-        log.info("【总部接口对接】response:{}",s);
-        JSONObject jsonObject = JSONObject.parseObject(s);
-        Integer statusCode = jsonObject.getInteger("status");
-        if (statusCode != 200) {
-            log.error("接口地址:{},对接总部接口失败",url);
-            return null;
-        }
-        return jsonObject;
-    }
-
-*/
-/**
-     * 同步总部机型名称和单价
-     * @param outCode
-     * @param mainNumber*//*
-
-
-
-    public void syncProduct(String insideCode,String outCode,String mainNumber,Rule rule){
-        try {
-            CheckBarcodeBean checkBarcodeBean = null;
-            if (StringUtils.isNotEmpty(insideCode)) {
-                String insideShortCode = insideCode.substring(0, 5);
-                Integer count = ruleService.lambdaQuery().eq(Rule::getInsideShortCode, insideShortCode).count();
-                if(count > 0){
-                    return;
-                }
-                checkBarcodeBean = this.getProductName(insideCode, Integer.parseInt(mainNumber));
-
-                this.saveProduct(mainNumber,insideShortCode,checkBarcodeBean);
-            }
-            CheckBarcodeBean checkBarcodeBean2 = null;
-            if (StringUtils.isNotEmpty(outCode)) {
-                checkBarcodeBean2 = this.getProductName(outCode, Integer.parseInt(mainNumber));
-            }
-            log.info("【同步总部机型】,code:{},mainNumber:{},返回结果:{}", insideCode, mainNumber, JSONObject.toJSONString(checkBarcodeBean));
-            if ((checkBarcodeBean != null  && mainNumber.equals(Constant.MAIN_NUMBER_101))
-                    || !mainNumber.equals(Constant.MAIN_NUMBER_101)) {
-
-                //生成新的结算规则
-                if(rule == null) {
-                   rule = new Rule();
-                }
-                if (checkBarcodeBean != null) {
-                    rule.setPrice(checkBarcodeBean.getJsdj());
-                    rule.setEnginPrice(checkBarcodeBean.getJsdj());
-                    rule.setInsideShortCode(checkBarcodeBean.getJxbh());
-                    rule.setInsideName(checkBarcodeBean.getJxmc());
-                }
-                if (checkBarcodeBean2 != null) {
-                    if (rule.getPrice() == null || rule.getPrice().doubleValue() == 0) {
-                        rule.setPrice(checkBarcodeBean2.getJsdj());
-                        rule.setEnginPrice(checkBarcodeBean2.getJsdj());
-                    }
-                    rule.setOutShortCode(checkBarcodeBean2.getJxbh());
-                    rule.setOutName(checkBarcodeBean2.getJxmc());
-                }
-                rule.setMainId(Integer.parseInt(mainNumber));
-                rule.setMainNumber(mainNumber);
-                rule.setInsideCode(insideCode);
-                rule.setOutCode(outCode);
-                rule.setCreateTime(new Date());
-                if(rule.getStlRuleId() != null){
-                    rule.updateById();
-                }else {
-                    rule.insert();
-                }
-            }
-        }catch(Exception e){
-            log.error("同步总部机型失败",e.getMessage());
-        }
-    }
-
-
-    public void saveProduct(String mainNumber,String insideShortCode,CheckBarcodeBean checkBarcodeBean){
-        if(StringUtils.isEmpty(mainNumber) || !mainNumber.equals(Constant.MAIN_NUMBER_101)){
-            return;
-        }
-        Integer count = productService.lambdaQuery().eq(Product::getProductCode, insideShortCode).count();
-        if(count > 0){
-            return;
-        }
-
-        Product product = new Product();
-        product.setMainNumber(mainNumber);
-        //product.setMainName(checkBarcodeBean.get);
-        product.setMaterialCode(checkBarcodeBean.getZjdm());
-        product.setMaterialName(checkBarcodeBean.getZjmc());
-        product.setNwbs("内机");
-        product.setPrice(checkBarcodeBean.getJsdj());
-        product.setProductCode(insideShortCode);
-        product.setCreateTime(new Date());
-        product.insert();
-
-    }
-
-    public void initProduct(){
-        log.info("【初始化套机数据】开始:"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
-        List<Rule> list = ruleService.lambdaQuery().ne(Rule::getInsideShortCode, "").eq(Rule::getMainNumber,Constant.MAIN_NUMBER_101).list();
-        for(Rule rule : list){
-            CheckBarcodeBean checkBarcodeBean = this.getProductName(rule.getInsideCode(), Integer.parseInt(rule.getMainNumber()));
-            if(checkBarcodeBean == null){
-                continue;
-            }
-            this.saveProduct(Constant.MAIN_NUMBER_101,rule.getInsideShortCode(),checkBarcodeBean);
-        }
-        log.info("【初始化套机数据】结束:"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
-    }
-
-
-*/
-/**
-     * 初始化机型名称*//*
-
-
-
-    public void init(){
-        List<ProductNew> list = productNewService.list();
-        for(ProductNew productNew : list){
-            String mainNumber = productNew.getMainNumber();
-            String insideCode = productNew.getInsideCode();
-
-            CheckBarcodeBean checkBarcodeBean = this.getProductName(insideCode, Integer.parseInt(mainNumber));
-            if(checkBarcodeBean == null){
-                productNew.setRemark("调取总部接口获取机型失败");
-                continue;
-            }
-            BeanUtils.copyProperties(checkBarcodeBean,productNew);
-            productNew.setProductName(checkBarcodeBean.getJxmc());
-            productNew.setPrice(checkBarcodeBean.getJsdj());
-        }
-        productNewService.updateBatchById(list);
-    }
-
-*/
-/**
-     * 请求总部接口
-     * @return*//*
-
-
-
-    public GreeResponseHelper greePost(String apiPath,Map<String,Object> bizContent,Integer belongType) throws Exception {
-        CommonParam commonParam = new CommonParam();
-        commonParam.setAppId(this.getAppId(belongType));
-        commonParam.setAppKey(this.getAppKey(belongType));
-        commonParam.setAppPath(apiPath);
-        commonParam.setJson(JSONObject.toJSONString(bizContent));
-        OutAppDefaultReq outAppDefaultReq = commonLogic.supplyParam(commonParam);
-        Map<String,String> header = new HashMap<>();
-        header.put("authorization","Bearer "+this.getAccessToken());
-
-        log.info("【请求总部接口】request:{}",JSONObject.toJSONString(outAppDefaultReq));
-//        String s = HttpUtils.post(apiUrl, JSONObject.toJSONString(outAppDefaultReq), header);
-        // 设置请求头
-        HttpHeaders headers = new HttpHeaders();
-        headers.setContentType(MediaType.APPLICATION_JSON);
-
-        for(String str : header.keySet()){
-            headers.set(str,header.get(str));
-        }
-
-        RestTemplate restTemplate = new RestTemplate();
-        HttpEntity<String> httpEntity = new HttpEntity<>(JSONObject.toJSONString(outAppDefaultReq), headers);
-        //获取返回数据
-        try {
-            String body = restTemplate.postForObject(apiUrl, httpEntity, String.class);
-            log.info("【请求总部接口】response:{}",body);
-            return JSONObject.parseObject(body, GreeResponseHelper.class);
-        }catch(HttpStatusCodeException ex) {
-        	log.error("rawStatusCode = {}",ex.getRawStatusCode());
-        	GreeResponseHelper greeResponseHelper = new GreeResponseHelper();
-        	greeResponseHelper.setStatus(ex.getRawStatusCode());
-//        	greeResponseHelper.setMsg(GreeResponseCodeEnum.valueOf(ex.getRawStatusCode()));
-        	greeResponseHelper.setMsg(ex.getMessage().substring(0,100));
-        	ex.printStackTrace();
-        	return greeResponseHelper;
-        }catch(Exception e){
-        	GreeResponseHelper greeResponseHelper = new GreeResponseHelper();
-        	greeResponseHelper.setStatus(ResponseHelper.ResponseCode_COMMON);
-        	greeResponseHelper.setMsg("非法请求");
-        	e.printStackTrace();
-        	return greeResponseHelper;
-        }
-    }
-
-*/
-/**
-     * 请求总部接口
-     * @return*//*
-
-
-
-    public GreeResponseHelper greePostDecryptFeed(String apiPath, DecryptFeedbackBean bean) throws Exception {
-        Map<String,String> header = new HashMap<>();
-        header.put("authorization","Bearer "+this.getAccessToken());
-
-        // 设置请求头
-        HttpHeaders headers = new HttpHeaders();
-        headers.setContentType(MediaType.APPLICATION_JSON);
-
-        for(String str : header.keySet()){
-            headers.set(str,header.get(str));
-        }
-
-        RestTemplate restTemplate = new RestTemplate();
-        HttpEntity<String> httpEntity = new HttpEntity<>(JSONObject.toJSONString(bean), headers);
-        log.info("【请求总部接口】request:{}",JSONObject.toJSONString(bean));
-
-        //获取返回数据
-        try {
-            String body = restTemplate.postForObject(apiUrlFeedBack+apiPath, httpEntity, String.class);
-            log.info("【请求总部接口】response:{}",body);
-            return JSONObject.parseObject(body, GreeResponseHelper.class);
-        }catch(HttpStatusCodeException ex) {
-            log.error("rawStatusCode = {}",ex.getRawStatusCode());
-            GreeResponseHelper greeResponseHelper = new GreeResponseHelper();
-            greeResponseHelper.setStatus(ex.getRawStatusCode());
-            greeResponseHelper.setMsg(ex.getMessage().substring(0,100));
-            ex.printStackTrace();
-            return greeResponseHelper;
-        }catch(Exception e){
-            GreeResponseHelper greeResponseHelper = new GreeResponseHelper();
-            greeResponseHelper.setStatus(ResponseHelper.ResponseCode_COMMON);
-            greeResponseHelper.setMsg("非法请求");
-            e.printStackTrace();
-            return greeResponseHelper;
-        }
-    }
-
-}
-*/

+ 0 - 52
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/LbsAmapController.java

@@ -1,52 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-import com.gree.mall.manager.bean.common.RegionBean;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.LbsAmapLogic;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@RequiredArgsConstructor
-@Slf4j
-@RestController
-@Api(value = "高德地图API", tags ={"高德地图API"} )
-@RequestMapping("lbs/amap")
-public class LbsAmapController {
-
-    private final LbsAmapLogic lbsAmapLogic;
-
-
-    @PostMapping("region/query")
-    @ApiOperation(value = "根据经纬度反查省市区街道")
-    public ResponseHelper<RegionBean> detailRange(
-            @ApiParam(value = "经度", required = true) @RequestParam String lng,
-            @ApiParam(value = "纬度", required = true) @RequestParam String lat
-    ) {
-        RegionBean regionBean = lbsAmapLogic.getRegionByLngLat(lng + "," + lat);
-        //        String street = regionByLngLat.get("street");
-        //        String province = regionByLngLat.get("province");
-        //        String city = regionByLngLat.get("city");
-        //        String area = regionByLngLat.get("area");
-        //        LbsAmap lbsAmap = lbsLogic.getByRegion(province, city, area, street);
-        return ResponseHelper.success(regionBean);
-    }
-
-
-    @PostMapping("region/query2")
-    @ApiOperation(value = "根据中文地址反查经纬度省市区街道")
-    public ResponseHelper<RegionBean> queryRegion(@ApiParam(value = "中文地址(越详细越好)", required = true) @RequestParam String address) {
-        String lnglat = lbsAmapLogic.getLocationByAddress(address);
-        RegionBean regionBean = lbsAmapLogic.getRegionByLngLat(lnglat);
-        return ResponseHelper.success(regionBean);
-    }
-
-
-
-}

+ 0 - 152
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/OpenDictController.java

@@ -1,152 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.common.*;
-import com.gree.mall.manager.enums.material.StateEnum;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.SysDictLogic;
-import com.gree.mall.manager.plus.entity.SysDict;
-import com.gree.mall.manager.plus.entity.SysDictType;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiParam;
-import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import javax.validation.constraints.NotBlank;
-import java.util.List;
-
-
-@Validated
-@RequiredArgsConstructor
-@RestController
-@Api(value = "字典业务配置", tags ={"字典业务配置"} )
-@RequestMapping("dict")
-public class OpenDictController {
-
-    private final SysDictLogic sysDictLogic;
-
-    @ZfireList
-    @PostMapping("page")
-    @ApiParam(value ="字典-分页")
-    public ResponseHelper<IPage<SysDictVO>> sysDictList(@RequestBody ZfireParamBean zfireParamBean) {
-        IPage<SysDictVO> sysDictIPage = sysDictLogic.sysDictIPage(zfireParamBean);
-        return ResponseHelper.success(sysDictIPage, new TypeReference<SysDictVO>() {
-        });
-    }
-
-    @ApiNotAuth
-    @PostMapping("listDict")
-    @ApiParam(value = "下拉框查询")
-    public ResponseHelper<List<SysDict>> sysDictBeanList(
-            @ApiParam(value = "类型", required = true) @RequestParam(required = true) String dictType,
-            @ApiParam(value = "父字典类型", required = false) @RequestParam(required = false) String parentDictType,
-            @ApiParam(value ="父code", required = false) @RequestParam(required = false) String parentDictCode,
-            @ApiParam(value = "家用/商用", required = false) @RequestParam(required = false) String flag,
-            @ApiParam(value = "服务单来源", required = false) @RequestParam(required = false) String source
-    ) {
-
-        List<SysDict> sysDicts = sysDictLogic.getSysDictList(dictType);
-        return ResponseHelper.success(sysDicts);
-    }
-    @ApiNotAuth
-    @PostMapping("type/list")
-    @ApiParam(value = "字典类型")
-    public ResponseHelper<List<SysDictTypeVO>> typeListAll() {
-        return ResponseHelper.success(sysDictLogic.typeList(null));
-    }
-
-
-
-    @PostMapping("addType")
-    @ApiParam(value = "字典类型-添加")
-    public ResponseHelper addType(@Valid @RequestBody SysDictType param) {
-        sysDictLogic.addType(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("updateType")
-    @ApiParam(value = "字典类型-修改")
-    public ResponseHelper updateType(@Valid @RequestBody SysDictType param) {
-        sysDictLogic.updateType(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("delType")
-    @ApiParam(value = "字典类型-删除")
-    public ResponseHelper delType(
-            @ApiParam(value  = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        sysDictLogic.delType(id, true);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("detailType")
-    @ApiParam(value = "字典类型-详情")
-    public ResponseHelper<SysDictType> detailType(
-            @ApiParam(value = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        SysDictType sysDict = sysDictLogic.detailType(id);
-        return ResponseHelper.success(sysDict);
-    }
-
-    @PostMapping("typeList")
-     @ApiParam(value = "字典类型")
-    public ResponseHelper<List<SysDictTypeVO>> typeList() {
-        return ResponseHelper.success(sysDictLogic.typeList(true));
-    }
-
-/*    @PostMapping("listDict")
-     @ApiParam(value = "字典值列表")
-    public ResponseHelper<List<SysDict>> dictList(
-            @ApiParam(value = "字典类型", required = true)
-            @NotBlank(message = "字典类型不能为空")
-
-            @RequestParam String type) {
-        List<SysDict> dictVOList = sysDictLogic.dictByType(type, true);
-        return ResponseHelper.success(dictVOList);
-    }*/
-
-    @PostMapping("add")
-     @ApiParam(value = "字典-添加")
-    public ResponseHelper add(@Valid @RequestBody SysDict param) {
-        sysDictLogic.saveOpenDict(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("update")
-     @ApiParam(value = "字典-修改")
-    public ResponseHelper update(@Valid @RequestBody SysDict param) {
-        sysDictLogic.updateOpenDict(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("del")
-     @ApiParam(value = "字典-删除")
-    public ResponseHelper del(
-            @ApiParam(value  = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        sysDictLogic.delete(id, true);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("detail")
-     @ApiParam(value = "字典-详情")
-    public ResponseHelper<SysDict> detail(
-            @ApiParam(value = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        SysDict sysDict = sysDictLogic.detail(id);
-        return ResponseHelper.success(sysDict);
-    }
-}

+ 0 - 50
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/RedirectController.java

@@ -1,50 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.logic.common.CommonLogic;
-import com.gree.mall.manager.plus.entity.SysDict;
-import com.gree.mall.manager.plus.service.SysDictService;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.rmi.RemoteException;
-
-@RequiredArgsConstructor
-@Controller
-public class RedirectController {
-
-
-    private final CommonLogic commonLogic;
-    private final SysDictService sysDictService;
-
-    @ApiNotAuth
-    @GetMapping("img/get")
-    public void getImg(
-            @RequestParam() String key,
-            HttpServletResponse response
-    ) throws IOException, RemoteServiceException {
-        String file = commonLogic.getFile(key);
-        response.sendRedirect(file);
-    }
-
-    @ApiOperation("帮助文档")
-    @GetMapping("help")
-    public void help(HttpServletResponse response) throws IOException {
-        SysDict sysDict = sysDictService.lambdaQuery().eq(SysDict::getDictType, "HELP").last("limit 1").one();
-        if(sysDict == null){
-            throw new RemoteServiceException("暂无文档链接,请联系相关人员");
-        }
-        if(sysDict != null){
-            response.sendRedirect(sysDict.getDictValue());
-        }
-
-    }
-
-}

+ 0 - 191
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/SysDictCompanyController.java

@@ -1,191 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.beust.jcommander.Parameter;
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.common.SysDictCompanyVO;
-import com.gree.mall.manager.bean.common.SysDictTypeVO;
-import com.gree.mall.manager.bean.common.SysDictVO;
-import com.gree.mall.manager.bean.websit.WebsitPartsRetVO;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.SysDictCompanyLogic;
-import com.gree.mall.manager.logic.common.SysDictLogic;
-import com.gree.mall.manager.plus.entity.SysDict;
-import com.gree.mall.manager.plus.entity.SysDictCompany;
-import com.gree.mall.manager.plus.entity.SysDictType;
-import com.gree.mall.manager.plus.entity.SysDictTypeCompany;
-import com.gree.mall.manager.utils.excel.ExcelUtils;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import javax.validation.constraints.NotBlank;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.List;
-
-
-@Validated
-@RequiredArgsConstructor
-@RestController
-@Api(value = "辅材字典业务配置", tags ={"辅材字典业务配置"} )
-@RequestMapping("dictCompany")
-public class SysDictCompanyController {
-
-    private final SysDictCompanyLogic sysDictCompanyLogic;
-
-    @ZfireList
-    @PostMapping("page")
-    @ApiOperation(value ="字典-分页")
-    public ResponseHelper<IPage<SysDictCompanyVO>> sysDictList(@RequestBody ZfireParamBean zfireParamBean) {
-        IPage<SysDictCompanyVO> sysDictIPage = sysDictCompanyLogic.sysDictIPage(zfireParamBean);
-        return ResponseHelper.success(sysDictIPage, new TypeReference<SysDictCompanyVO>() {
-        });
-    }
-
-    @PostMapping("/pageExport")
-    @ApiOperation(value = "字典-分页导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-        //2.查询要导出的内容
-        IPage<SysDictCompanyVO> sysDictIPage = sysDictCompanyLogic.sysDictIPage(zfireParamBean);
-        //3.导出
-        FieldUtils.exportData(sysDictIPage.getRecords(), zfireParam.getExportFields(), request, response);
-    }
-
-
-    @ApiNotAuth
-    @PostMapping("listDict")
-    @ApiOperation(value = "下拉框查询")
-    public ResponseHelper<List<SysDictCompany>> sysDictBeanList(
-            @ApiParam(value = "类型", required = true) @RequestParam(required = true) String dictType,
-            @ApiParam(value = "父字典类型", required = false) @RequestParam(required = false) String parentDictType,
-            @ApiParam(value ="父code", required = false) @RequestParam(required = false) String parentDictCode,
-            @ApiParam(value = "家用/商用", required = false) @RequestParam(required = false) String flag,
-            @ApiParam(value = "服务单来源", required = false) @RequestParam(required = false) String source
-    ) {
-
-        List<SysDictCompany> sysDicts = sysDictCompanyLogic.getSysDictList(dictType);
-        return ResponseHelper.success(sysDicts);
-    }
-    @ApiNotAuth
-    @PostMapping("type/list")
-    @ApiOperation(value = "字典类型")
-    public ResponseHelper<List<SysDictTypeCompany>> typeListAll() {
-        return ResponseHelper.success(sysDictCompanyLogic.typeList(null));
-    }
-
-
-
-    @PostMapping("addType")
-    @ApiOperation(value = "字典类型-添加")
-    public ResponseHelper addType(@Valid @RequestBody SysDictType param) {
-        sysDictCompanyLogic.addType(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("updateType")
-    @ApiOperation(value = "字典类型-修改")
-    public ResponseHelper updateType(@Valid @RequestBody SysDictType param) {
-        sysDictCompanyLogic.updateType(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("delType")
-    @ApiOperation(value = "字典类型-删除")
-    public ResponseHelper delType(
-            @ApiParam(value  = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        sysDictCompanyLogic.delType(id, true);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("detailType")
-    @ApiOperation(value = "字典类型-详情")
-    public ResponseHelper<SysDictTypeCompany> detailType(
-            @ApiParam(value = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        SysDictTypeCompany sysDict = sysDictCompanyLogic.detailType(id);
-        return ResponseHelper.success(sysDict);
-    }
-
-    @PostMapping("typeList")
-     @ApiOperation(value = "字典类型")
-    public ResponseHelper<List<SysDictTypeVO>> typeList() {
-        return ResponseHelper.success(sysDictCompanyLogic.typeList(true));
-    }
-
-/*    @PostMapping("listDict")
-     @ApiOperation(value = "字典值列表")
-    public ResponseHelper<List<SysDict>> dictList(
-            @ApiOperation(value = "字典类型", required = true)
-            @NotBlank(message = "字典类型不能为空")
-
-            @RequestParam String type) {
-        List<SysDict> dictVOList = sysDictLogic.dictByType(type, true);
-        return ResponseHelper.success(dictVOList);
-    }*/
-
-    @PostMapping("add")
-     @ApiOperation(value = "字典-添加")
-    public ResponseHelper add(@Valid @RequestBody SysDictCompany param) {
-        sysDictCompanyLogic.saveOpenDict(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("update")
-     @ApiOperation(value = "字典-修改")
-    public ResponseHelper update(@Valid @RequestBody SysDictCompany param) {
-        sysDictCompanyLogic.updateOpenDict(param);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("del")
-     @ApiOperation(value = "字典-删除")
-    public ResponseHelper del(
-            @ApiParam(value  = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        sysDictCompanyLogic.delete(id, true);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("detail")
-     @ApiOperation(value = "字典-详情")
-    public ResponseHelper<SysDictCompany> detail(
-            @ApiParam(value = "字典值id")
-            @NotBlank(message = "字典值id不能为空")
-            @RequestParam String id) {
-        SysDictCompany sysDict = sysDictCompanyLogic.detail(id);
-        return ResponseHelper.success(sysDict);
-    }
-
-    @PostMapping("/importExcel")
-    @ApiOperation(value = "导入")
-    public ResponseHelper importExcel(
-            @ApiParam(required = true, value = "附件") @RequestPart("file") MultipartFile file,
-            HttpServletRequest request
-    ) throws RemoteServiceException, IOException, ParseException {
-        List<Object> objects = ExcelUtils.importExcel(file);
-        sysDictCompanyLogic.importExcel(objects,request);
-        return ResponseHelper.success();
-    }
-
-}

+ 0 - 258
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/common/WechatController.java

@@ -1,258 +0,0 @@
-package com.gree.mall.manager.controller.common;
-
-import com.alibaba.excel.util.StringUtils;
-import com.gree.mall.manager.annotation.ApiNotAuth;
-import com.gree.mall.manager.bean.PayDetail;
-import com.gree.mall.manager.bean.common.WechatOpenBean;
-import com.gree.mall.manager.bean.common.WxJsApiSignBean;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.CommonLogic;
-import com.gree.mall.manager.logic.common.WechatLogic;
-import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
-import com.gree.mall.manager.plus.service.AdminCompanyWechatService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.RequiredArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import me.chanjar.weixin.common.error.WxErrorException;
-import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-
-@RequiredArgsConstructor
-@Slf4j
-@RestController
-@Api(value = "微信api", tags ={"微信api"} )
-@RequestMapping("wechat")
-public class WechatController {
-
-    private final WechatLogic wechatLogic;
-    private final CommonLogic commonLogic;
-    private final AdminCompanyWechatService adminCompanyWechatService;
-
-    @ApiNotAuth
-    @PostMapping("/auth")
-    @ApiOperation(value = "授权")
-    public ResponseHelper<String> getQrcode(
-            @RequestParam String code,
-            @RequestParam(required = false) String phoneCode,
-            @RequestParam String companyWechatId
-    ) {
-        WechatOpenBean wechatOpenBean = wechatLogic.authToken(code, companyWechatId);
-        if(StringUtils.isNotBlank(phoneCode)) {
-            String mobile = wechatLogic.authMobile(phoneCode, companyWechatId);
-            wechatOpenBean.setMobile(mobile);
-        }
-        return ResponseHelper.success(wechatOpenBean);
-    }
-
-    @PostMapping("/qrcode/get")
-    @ApiOperation(value = "获取小程序二维码")
-    public ResponseHelper<String> getQrcode(
-            @ApiParam("二维码类型") @RequestParam String qrcodeType,
-            @RequestParam String objId,
-            @RequestParam String userId,
-            @RequestParam String companyWechatId
-    ) {
-        String qrcode = wechatLogic.getQrcode(qrcodeType, objId, userId, companyWechatId);
-        return ResponseHelper.success(qrcode);
-    }
-
-    @ApiNotAuth
-    @PostMapping("/zdhf/get")
-    @ApiOperation("获取自动回复的内容")
-    public ResponseHelper<String> getZdhf(@RequestParam String appid) throws WxErrorException {
-        AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.lambdaQuery()
-                .eq(AdminCompanyWechat::getPubAppId, appid)
-                .last("limit 1").one();
-        if(adminCompanyWechat != null) {
-            String zdhf = wechatLogic.getZdhf(adminCompanyWechat.getCompanyWechatId());
-            return ResponseHelper.success(zdhf);
-        }
-        return ResponseHelper.success("");
-    }
-
-
-    @PostMapping("/payment/h5")
-    @ApiOperation(value = "微信h5支付")
-    public ResponseHelper<PayDetail> paymentH5(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String openId,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatId
-    ) throws Exception {
-        PayDetail payDetail = wechatLogic.paymentH5(orderId, payAmount, openId, profitSharingFlag, ip, companyWechatId);
-        return ResponseHelper.success(payDetail);
-    }
-
-    @PostMapping("/paymentWebsit/h5")
-    @ApiOperation(value = "微信h5支付")
-    public ResponseHelper<PayDetail> paymentWebsitH5(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String openId,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatId
-    ) throws Exception {
-        PayDetail payDetail = wechatLogic.paymentWebsitH5(orderId, payAmount, openId, profitSharingFlag, ip, companyWechatId);
-        return ResponseHelper.success(payDetail);
-    }
-
-
-    @PostMapping("/paymentWebsit")
-    @ApiOperation(value = "微信小程序支付")
-    public ResponseHelper<PayDetail> paymentWebsit(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String openId,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatId,
-            @ApiParam(value = "是否小程序支付",required = false) @RequestParam(required = false) Boolean miniPay
-    ) throws Exception {
-        PayDetail payDetail = wechatLogic.paymentWebsit(orderId, payAmount, openId, profitSharingFlag, ip, companyWechatId,miniPay);
-        return ResponseHelper.success(payDetail);
-    }
-
-
-    @PostMapping("/payment")
-    @ApiOperation(value = "微信小程序支付")
-    public ResponseHelper<PayDetail> payment(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String openId,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatId,
-            @ApiParam(value = "是否小程序支付",required = false) @RequestParam(required = false) Boolean miniPay
-    ) throws Exception {
-        PayDetail payDetail = wechatLogic.paymentJSAPI(orderId, payAmount, openId, profitSharingFlag, ip, companyWechatId,miniPay);
-        return ResponseHelper.success(payDetail);
-    }
-
-
-    @PostMapping("/payment/fkm")
-    @ApiOperation(value = "付款码支付")
-    public ResponseHelper<String> paymentFkm(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatId,
-            @RequestParam String authCode,
-            @RequestParam String source
-    ) throws Exception {
-        String transcationId = wechatLogic.paymentFkm(orderId, payAmount, profitSharingFlag, ip, companyWechatId, authCode,source);
-        return ResponseHelper.success(transcationId);
-    }
-
-    @PostMapping("/payment/fkmWebsit")
-    @ApiOperation(value = "付款码支付")
-    public ResponseHelper<String> paymentfkmWebsit(
-            @ApiParam("订单号") @RequestParam String orderId,
-            @RequestParam BigDecimal payAmount,
-            @RequestParam String profitSharingFlag,
-            @RequestParam String ip,
-            @RequestParam String companyWechatConfigId,
-            @RequestParam String authCode,
-            @RequestParam String source
-    ) throws Exception {
-        String transcationId = wechatLogic.paymentfkmWebsit(orderId, payAmount, profitSharingFlag, ip, companyWechatConfigId, authCode,source);
-        return ResponseHelper.success(transcationId);
-    }
-
-//    @ApiNotAuth
-//    @PostMapping("/pub/auth/url")
-//    @ApiOperation("公众号授权绑定小程序url")
-//    public ResponseHelper<String> pubAuthUrl(
-//            @RequestParam String code,
-//            @RequestParam String pubAppId
-//    ) throws WxErrorException, IOException {
-//        String urlScheme = commonLogic.getPubOpenIdUrl(code, pubAppId);
-//        return ResponseHelper.success(urlScheme);
-//    }
-
-    @ApiNotAuth
-    @PostMapping("/pub/auth")
-    @ApiOperation("公众号授权")
-    public ResponseHelper<String> pubAuth(
-            @RequestParam String code,
-            @RequestParam String pubAppId
-    ) throws WxErrorException, IOException {
-        String openId = commonLogic.getPubOpenId(code, pubAppId);
-        return ResponseHelper.success(openId);
-    }
-
-
-
-    @PostMapping("/pub/jsapi/sign")
-    @ApiOperation("公众号jsapsign")
-    public ResponseHelper<WxJsApiSignBean> pubJsapiSign(
-            @RequestParam String companyWechatId,
-            @RequestParam String url
-    ) throws WxErrorException, IOException {
-        WxJsApiSignBean jsapiSign = wechatLogic.getJsapiSign(companyWechatId, url);
-        return ResponseHelper.success(jsapiSign);
-    }
-
-    @ApiNotAuth
-    @PostMapping("/get/mp/qrcode")
-    @ApiOperation("生成带参数的二维码")
-    public ResponseHelper<WxMpQrCodeTicket> getMpQrcode(
-            @RequestParam String userId,
-            @RequestParam String companyWechatId
-    ) throws Exception {
-        WxMpQrCodeTicket ticket = wechatLogic.getMpQrcode(userId, companyWechatId);
-        return ResponseHelper.success(ticket);
-    }
-
-    @ApiNotAuth
-    @PostMapping("/authCode")
-    @ApiOperation(value = "授权小程序id")
-    public ResponseHelper<WechatOpenBean> authCode(
-            @RequestParam String code,
-            @ApiParam(required = false) @RequestParam(required = false) String phoneCode,
-            @RequestParam String appid
-    ) {
-        WechatOpenBean wechatOpenBean = wechatLogic.authCode(code, appid);
-        if(StringUtils.isNotBlank(phoneCode)) {
-            String mobile = wechatLogic.authMobile(phoneCode, appid);
-            wechatOpenBean.setMobile(mobile);
-        }
-        return ResponseHelper.success(wechatOpenBean);
-    }
-
-
-
-//    @PostMapping("/payment/zfire")
-//    @ApiOperation(value = "众炬续费")
-//    public ResponseHelper<Boolean> zfire(
-//    ) throws Exception {
-//        wechatLogic.zfirePayment();
-//        return ResponseHelper.success();
-//    }
-
-
-
-    @ApiNotAuth
-    @PostMapping("/deliver")
-    //@ApiOperation(value = "发货")
-    public ResponseHelper<Boolean> paymentDeliver(
-            @RequestParam String companyWechatId,
-            @RequestParam String transactionId,
-            @RequestParam String openId
-    ) throws Exception {
-        wechatLogic.deliver(companyWechatId, transactionId,null,openId);
-        return ResponseHelper.success(true);
-    }
-
-}

+ 0 - 53
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/sync/SyncController.java

@@ -1,53 +0,0 @@
-package com.gree.mall.manager.controller.sync;
-
-import cn.hutool.core.lang.TypeReference;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.gree.mall.manager.annotation.ZfireList;
-import com.gree.mall.manager.bean.policy.PolicyDetail;
-import com.gree.mall.manager.bean.policy.PolicyVo;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.SyncOrderInfoLogic;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
-import com.gree.mall.manager.zfire.util.FieldUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.text.ParseException;
-
-@Slf4j
-@RestController
-@Api(value = "同步广佛工单API", tags = {"同步广佛工单API"})
-@RequestMapping(value = "/syncOrderInfo", produces = "application/json; charset=utf-8")
-public class SyncController {
-
-    @Autowired
-    private SyncOrderInfoLogic syncOrderInfoLogic;
-
-
-    @PostMapping("/syncGuang")
-    @ApiOperation("同步广州销司")
-    public ResponseHelper syncGuang(
-
-    ) throws ParseException {
-        syncOrderInfoLogic.syncGuang();
-        return ResponseHelper.success();
-    }
-
-
-    @PostMapping("/syncDetail")
-    @ApiOperation("同步订单详情")
-    public ResponseHelper syncDetail(
-
-    ) throws ParseException {
-        syncOrderInfoLogic.syncDetail();
-        return ResponseHelper.success();
-    }
-}

+ 0 - 93
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/wxCustomer/WeCallBackController.java

@@ -1,93 +0,0 @@
-//package com.gree.mall.manager.controller.wxCustomer;
-//
-//
-//import cn.hutool.http.HttpUtil;
-//import com.alibaba.fastjson.JSON;
-//import com.alibaba.fastjson.JSONObject;
-//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-//import com.gree.mall.manager.annotation.ApiNotAuth;
-//import com.gree.mall.manager.logic.common.WorkWechatLogic;
-//import com.gree.mall.manager.logic.sop.SopRuleLogic;
-//import com.gree.mall.manager.plus.entity.AdminCompanyWechat;
-//import com.gree.mall.manager.plus.service.AdminCompanyWechatService;
-//import com.gree.mall.manager.utils.wecom.WxCryptUtil;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiModelProperty;
-//import io.swagger.annotations.ApiOperation;
-//import lombok.extern.slf4j.Slf4j;
-//import me.chanjar.weixin.cp.api.WxCpService;
-//import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
-//import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
-//import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.http.MediaType;
-//import org.springframework.web.bind.annotation.*;
-//import org.springframework.web.context.request.RequestContextHolder;
-//import org.springframework.web.context.request.ServletRequestAttributes;
-//
-//import javax.servlet.http.HttpServletRequest;
-//import java.util.HashMap;
-//import java.util.Map;
-//
-///**
-// * @author danmo
-// * @description 企微回调通知接口
-// * @date 2020/11/6 17:31
-// **/
-//@Api(tags = "企微回调通知")
-//@Slf4j
-//@RestController
-//@RequestMapping("/wx/callback")
-//public class WeCallBackController {
-//
-//    @Autowired
-//    private SopRuleLogic sopRuleLogic;
-//
-//    @Autowired
-//    private AdminCompanyWechatService adminCompanyWechatService;
-//
-//    @Autowired
-//    private WorkWechatLogic workWechatLogic;
-//
-//    @ApiModelProperty("post数据接收")
-//    @PostMapping(value = "/recive/{corpId}")
-//    @ApiNotAuth
-//    public String recive(@RequestBody String msg, @RequestParam(name = "msg_signature") String signature,
-//                         String timestamp, String nonce,@PathVariable("corpId") String corpId) {
-//        AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getOne(Wrappers.<AdminCompanyWechat>lambdaQuery().eq(AdminCompanyWechat::getCorpId, corpId).last("limit 1"));
-//        WxCryptUtil wxCryptUtil = new WxCryptUtil(adminCompanyWechat.getToken(), adminCompanyWechat.getEncodingaesKey(), corpId);
-//        try {
-//            String decrypt = wxCryptUtil.decrypt(signature, timestamp, nonce, msg);
-//            sopRuleLogic.pushTaskWorker(decrypt,corpId);
-//            return decrypt;
-//        } catch (Exception e) {
-//            e.printStackTrace();;
-//            String sRespData = WxCryptUtil.getTextRespData("success");
-//            return wxCryptUtil.encrypt(sRespData);
-//        }
-//    }
-//
-//    @ApiModelProperty("get数据校验")
-//    @GetMapping(value = "/recive/{corpId}")
-//    @ApiNotAuth
-//    public String recive(HttpServletRequest request,@PathVariable("corpId") String corpId) {
-//        // 微信加密签名
-//        String sVerifyMsgSig = request.getParameter("msg_signature");
-//        // 时间戳
-//        String sVerifyTimeStamp = request.getParameter("timestamp");
-//        // 随机数
-//        String sVerifyNonce = request.getParameter("nonce");
-//        // 随机字符串
-//        String sVerifyEchoStr = request.getParameter("echostr");
-//
-//        AdminCompanyWechat adminCompanyWechat = adminCompanyWechatService.getOne(Wrappers.<AdminCompanyWechat>lambdaQuery().eq(AdminCompanyWechat::getCorpId, corpId).last("limit 1"));
-//        WxCryptUtil wxCryptUtil = new WxCryptUtil(adminCompanyWechat.getToken(), adminCompanyWechat.getEncodingaesKey(), corpId);
-//        try {
-//            String s = wxCryptUtil.verifyURL(sVerifyMsgSig, sVerifyTimeStamp, sVerifyNonce, sVerifyEchoStr);
-//            return s;
-//        } catch (Exception e) {
-//            return "error";
-//        }
-//    }
-//
-//}

+ 0 - 59
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/wxCustomer/WxCustomerController.java

@@ -1,59 +0,0 @@
-package com.gree.mall.manager.controller.wxCustomer;
-
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.gree.mall.manager.bean.wxCustomer.WxCustomerBean;
-import com.gree.mall.manager.bean.wxCustomer.WxCustomerTagBean;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.wxCustomer.WxCustomerLogic;
-import com.gree.mall.manager.plus.entity.Tag;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Date;
-
-@Slf4j
-@RestController
-@Api(value = "企业微信客户", tags = {"企业微信客户"})
-@RequestMapping(value = "/wx/customer/", produces = "application/json; charset=utf-8")
-public class WxCustomerController {
-    @Autowired
-    private WxCustomerLogic wxCustomerLogic;
-
-    @GetMapping("/list")
-    @ApiOperation("微信外部联系人列表")
-    public ResponseHelper<IPage<WxCustomerBean>> list(
-            @ApiParam(value = "keyword", required = false) @RequestParam(required = false) String keyword,
-            @ApiParam(value = "标签id数组", required = false) @RequestParam(required = false) String[] tagIds,
-            @ApiParam(value = "开始时间", required = false) @RequestParam(required = false) Date startTime,
-            @ApiParam(value = "结束时间", required = false) @RequestParam(required = false) Date endtTime,
-            @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
-            @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize
-    ) {
-        return ResponseHelper.success(wxCustomerLogic.list(keyword, tagIds, startTime, endtTime, pageNum, pageSize));
-    }
-
-
-    @GetMapping("/detail")
-    @ApiOperation("微信外部联系人详情")
-    public ResponseHelper<WxCustomerBean> detail(
-            @ApiParam(value = "客户外部联系人externalUserId", required = true) @RequestParam String externalUserId
-    ) {
-        return ResponseHelper.success(wxCustomerLogic.detail(externalUserId));
-    }
-
-
-    @PostMapping("/tag/edit")
-    @ApiOperation("打标签")
-    public ResponseHelper edit(
-            @ApiParam(value = "标签数据", required = true) @RequestBody WxCustomerTagBean wxCustomerTagBean) {
-        wxCustomerLogic.edit(wxCustomerTagBean);
-        return ResponseHelper.success();
-    }
-
-
-}

+ 0 - 143
mall-server-sync-api/src/main/java/com/gree/mall/manager/controller/zfire/ZfireController.java

@@ -1,143 +0,0 @@
-package com.gree.mall.manager.controller.zfire;
-
-import cn.hutool.core.bean.BeanUtil;
-import org.apache.commons.lang3.StringUtils;
-import com.gree.mall.manager.bean.admin.AdminUserCom;
-import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.helper.ResponseHelper;
-import com.gree.mall.manager.logic.common.CommonLogic;
-import com.gree.mall.manager.plus.entity.AdminField;
-import com.gree.mall.manager.plus.entity.AdminFieldCustomParam;
-import com.gree.mall.manager.plus.entity.AdminFieldCustomParamItem;
-import com.gree.mall.manager.plus.service.AdminFieldCustomParamItemService;
-import com.gree.mall.manager.plus.service.AdminFieldCustomParamService;
-import com.gree.mall.manager.plus.service.AdminFieldService;
-import com.gree.mall.manager.zfire.bean.QueryParamBean;
-import com.gree.mall.manager.zfire.bean.ZfireCustomParam;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-@Slf4j
-@RestController
-@RequestMapping("zfire")
-public class ZfireController {
-
-    @Autowired
-    CommonLogic commonLogic;
-
-    @Autowired
-    AdminFieldService adminFieldService;
-
-    @Autowired
-    AdminFieldCustomParamService adminFieldCustomParamService;
-
-    @Autowired
-    AdminFieldCustomParamItemService adminFieldCustomParamItemService;
-
-    @PostMapping("save")
-    @ApiOperation(value = "保存配置的列表字段")
-    public ResponseHelper<List<AdminField>> save(@RequestBody List<AdminField> adminFieldList) {
-        if (CollectionUtils.isEmpty(adminFieldList)) {
-            return ResponseHelper.success();
-        }
-        String adminUserId = adminFieldList.get(0).getAdminUserId();
-        String moduleId = adminFieldList.get(0).getModuleId();
-        adminFieldService.lambdaUpdate().eq(AdminField::getAdminUserId, adminUserId).eq(AdminField::getModuleId, moduleId).remove();
-        adminFieldService.saveBatch(adminFieldList);
-        return ResponseHelper.success(adminFieldList);
-    }
-
-    @PostMapping("delete")
-    @ApiOperation(value ="删除配置的列表字段")
-    public ResponseHelper save(@RequestParam String adminUserId, @RequestParam String moduleId) {
-        adminFieldService.lambdaUpdate().eq(AdminField::getAdminUserId, adminUserId).eq(AdminField::getModuleId, moduleId).remove();
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("param/save")
-    @ApiOperation(value ="自定义的查询条件-保存")
-    public ResponseHelper saveParam(@Valid @RequestBody ZfireCustomParam zfireCustomParam) {
-        if (CollectionUtils.isEmpty(zfireCustomParam.getItems())) {
-            throw new RemoteServiceException("缺少必要的参数items");
-        }
-        if (zfireCustomParam.getName().length() > 8) {
-            throw new RemoteServiceException("自定义查询方案名称长度不可超过8");
-        }
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        if (StringUtils.isBlank(zfireCustomParam.getId())) {
-            Integer count = adminFieldCustomParamService.lambdaQuery().eq(AdminFieldCustomParam::getAdminUserId, adminUser.getAdminUserId())
-                    .eq(AdminFieldCustomParam::getModuleId, zfireCustomParam.getModuleId()).count();
-            if (count >= 10) {
-                throw new RemoteServiceException("最多支持10个自定义查询方案");
-            }
-        }
-        AdminFieldCustomParam adminFieldCustomParam = new AdminFieldCustomParam();
-        adminFieldCustomParam.setId(zfireCustomParam.getId());
-        adminFieldCustomParam.setName(zfireCustomParam.getName());
-        adminFieldCustomParam.setModuleId(zfireCustomParam.getModuleId());
-        adminFieldCustomParam.setAdminUserId(adminUser.getAdminUserId());
-        adminFieldCustomParam.insertOrUpdate();
-        adminFieldCustomParamItemService.lambdaUpdate().eq(AdminFieldCustomParamItem::getAdminFieldCustomId, adminFieldCustomParam.getId()).remove();
-        List<AdminFieldCustomParamItem> items = BeanUtil.copyToList(zfireCustomParam.getItems(), AdminFieldCustomParamItem.class);
-        items.forEach(v -> v.setAdminFieldCustomId(adminFieldCustomParam.getId()));
-        adminFieldCustomParamItemService.saveBatch(items);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("param/delete")
-    @ApiOperation(value = "自定义的查询条件-删除")
-    public ResponseHelper deleteParam(@RequestParam String id) {
-        adminFieldCustomParamItemService.lambdaUpdate().eq(AdminFieldCustomParamItem::getAdminFieldCustomId, id).remove();
-        adminFieldCustomParamService.removeById(id);
-        return ResponseHelper.success();
-    }
-
-    @PostMapping("param/list")
-    @ApiOperation(value = "自定义的查询条件-查询")
-    public ResponseHelper<List<ZfireCustomParam>> listParam(@RequestParam String moduleId) {
-        AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<AdminFieldCustomParam> list = adminFieldCustomParamService.lambdaQuery()
-                .eq(AdminFieldCustomParam::getAdminUserId, adminUser.getAdminUserId())
-                .eq(AdminFieldCustomParam::getModuleId, moduleId).list();
-        List<ZfireCustomParam> zfireCustomBeans = BeanUtil.copyToList(list, ZfireCustomParam.class);
-        for (ZfireCustomParam bean : zfireCustomBeans) {
-            List<AdminFieldCustomParamItem> items = adminFieldCustomParamItemService.lambdaQuery().eq(AdminFieldCustomParamItem::getAdminFieldCustomId, bean.getId()).list();
-            List<QueryParamBean> newItems = BeanUtil.copyToList(items, QueryParamBean.class);
-            bean.setItems(newItems);
-        }
-        return ResponseHelper.success(zfireCustomBeans);
-    }
-
-    //    @ZfireList
-    //    @PostMapping("list")
-    //    @Operation(summary = "新方式重写MyMaterialController.list接口")
-    //    public ResponseHelper<IPage<ZStockBean>> list(
-    //            @RequestBody ZfireParamBean zfireParamBean
-    //    ) {
-    //        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-    //        IPage<ZStockBean> stockBeanIPage = myMaterialMapper.list2(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
-    //        return ResponseHelper.success(stockBeanIPage, new TypeReference<ZStockBean>() {});
-    //    }
-    //
-    //    @PostMapping("list/export")
-    //    @Operation(summary = "新方式重写MyMaterialController.list接口的导出")
-    //    public void listExport(
-    //            @RequestBody ZfireParamBean zfireParamBean,
-    //            HttpServletRequest request,
-    //            HttpServletResponse response
-    //    ) throws Exception {
-    //        //1.组装查询条件
-    //        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
-    //        //2.查询要导出的内容
-    //        IPage<ZStockBean> stockBeanIPage = myMaterialMapper.list2(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
-    //        //3.导出
-    //        FieldUtils.exportData(stockBeanIPage.getRecords(),zfireParam.getExportFields(),request,response);
-    //    }
-}