FengChaoYu 5 hónapja
szülő
commit
e981f1cd11

+ 5 - 5
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/common/CommonLogic.java

@@ -89,17 +89,17 @@ public class CommonLogic {
             token = request.getParameter("x-token");
         }
 
-        if (StringUtils.isBlank(device) && StringUtils.isBlank(appid)) {
-            throw new RemoteServiceException("非法请求,缺少必须的参数");
-        }
+//        if (StringUtils.isBlank(device) && StringUtils.isBlank(appid)) {
+//            throw new RemoteServiceException("非法请求,缺少必须的参数");
+//        }
        // log.info("打印token:"+token);
         AdminCompanyWechat adminCompanyWechat;
         User user = null;
         if (StringUtils.isBlank(device)) {
             adminCompanyWechat = adminCompanyWechatService.lambdaQuery()
                     .eq(AdminCompanyWechat::getSubAppId, appid)
-//                .or()
-//                .eq(AdminCompanyWechat::getPubAppId,appid)
+                .or()
+                .eq(AdminCompanyWechat::getPubAppId,appid)
                     .one();
             if (adminCompanyWechat == null) {
                 throw new RemoteServiceException("非法请求,请联系管理员配置必要的参数:" + appid);

+ 6 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/workorder/OrderBaseLogic.java

@@ -433,6 +433,12 @@ public class OrderBaseLogic {
 
         final AdminWebsit adminWebsit = adminWebsitService.getById(pgOrderBase.getWebsitId());
 
+
+        if ("安装, 拆移机".contains(pgOrderBase.getOrderSmallTypeText())
+                && (StringUtils.isBlank(one.getWorkerNumber()) || (!pgOrderBase.getWorkerId().equals(one.getWorkerId())))) {
+            throw new RemoteServiceException("暂无权限接单");
+        }
+
         if (adminWebsit.getAttr().equals(WebsitAttrEnum.SELF.getKey())
                 && "安装, 拆移机".contains(pgOrderBase.getOrderSmallTypeText())
                 && CollectionUtil.isEmpty(workerList)) {