‘linchangsheng’ 8 months ago
parent
commit
0b541b409f

+ 7 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/admin/AdminWebsitController.java

@@ -45,9 +45,14 @@ public class AdminWebsitController {
             @ApiParam(value = "A=平台 B=商户网点 C=普通网点") @RequestParam(required = false) String type,
             @RequestParam(required = false) Boolean isAll,
             @RequestParam(required = false) Boolean status,
-            @RequestParam(required = false) Boolean isIncre
+            @RequestParam(required = false) Boolean isIncre,
+            @RequestParam(required = false) String streetCode,
+            @RequestParam(required = false) String channelId,
+            @RequestParam(required = false) String categoryId,
+            @RequestParam(required = false) String orderSourceId,
+            @RequestParam(required = false) String orderSmallId
     ) {
-        List<AdminWebsit> list = adminWebsitLogic.list(type, isAll, isIncre, status);
+        List<AdminWebsit> list = adminWebsitLogic.list(type, isAll, isIncre, status,streetCode,channelId,categoryId,orderSmallId,orderSourceId);
         return ResponseHelper.success(list);
     }
 

+ 18 - 2
mall-server-api/src/main/java/com/gree/mall/manager/logic/admin/AdminWebsitLogic.java

@@ -15,6 +15,7 @@ import com.gree.mall.manager.logic.common.CommonLogic;
 import com.gree.mall.manager.logic.common.LbsAmapLogic;
 import com.gree.mall.manager.plus.entity.*;
 import com.gree.mall.manager.plus.service.*;
+import com.gree.mall.manager.utils.StringUtil;
 import com.gree.mall.manager.utils.excel.ExcelUtils;
 import lombok.extern.slf4j.Slf4j;
 import me.chanjar.weixin.common.error.WxErrorException;
@@ -63,6 +64,9 @@ public class AdminWebsitLogic {
     AdminCompanyWechatPayConfigService adminCompanyWechatPayConfigService;
     @Resource
     WebsitUserService websitUserService;
+
+    @Autowired
+    WebsitDispatchService websitDispatchService;
 //    @Autowired
 //    EnterpriseWechatWorkerLogic enterpriseWechatWorkerLogic;
 
@@ -101,12 +105,24 @@ public class AdminWebsitLogic {
         return parentList;
     }
 
-
-    public List<AdminWebsit> list(String type, Boolean isAll, Boolean isIncre, Boolean status) {
+    public List<AdminWebsit> list(String type, Boolean isAll, Boolean isIncre, Boolean status,String streetCode, String channelId, String categoryId,
+                                  String orderSmallId, String orderSourceId) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
 
+
+        List<String> websitIds = websitDispatchService.lambdaQuery()
+                .eq(!StringUtil.isEmpty(adminUser.getCompanyWechatId()), WebsitDispatch::getCompanyWechatId, adminUser.getCompanyWechatId())
+                .eq(!StringUtil.isEmpty(streetCode), WebsitDispatch::getStreetCode, streetCode)
+                .eq(!StringUtil.isEmpty(channelId), WebsitDispatch::getDictCode, channelId)
+                .eq(!StringUtil.isEmpty(categoryId), WebsitDispatch::getCategoryId, categoryId)
+                .eq(!StringUtil.isEmpty(orderSmallId), WebsitDispatch::getOrderSmallId, orderSmallId)
+                .eq(!StringUtil.isEmpty(orderSourceId), WebsitDispatch::getOrderSource, orderSourceId)
+                .list().stream().map(WebsitDispatch::getWebsitId).collect(Collectors.toList());
+
+
         List<AdminWebsit> list = adminWebsitService.lambdaQuery()
                 .eq(StringUtils.isNotBlank(type), AdminWebsit::getType, type)
+                .in(StringUtils.isNotBlank(streetCode) && !CollectionUtils.isEmpty(websitIds), AdminWebsit::getWebsitId, websitIds)
                 .eq(isIncre != null, AdminWebsit::getIsIncre, isIncre)
                 .eq(status != null, AdminWebsit::getStatus, status)
                 .in(CollectionUtils.isNotEmpty(adminUser.getAdminWebsitIds()) && (isAll == null || !isAll), AdminWebsit::getWebsitId, adminUser.getAdminWebsitIds())