7 Коміти 4c57c2ba60 ... d9a79c1428

Автор SHA1 Опис Дата
  ‘linchangsheng’ d9a79c1428 需求 6 днів тому
  ‘linchangsheng’ 4e68eadf63 需求 1 тиждень тому
  ‘linchangsheng’ ae3452d1f0 需求 1 тиждень тому
  ‘linchangsheng’ d19eca3673 需求 1 тиждень тому
  ‘linchangsheng’ a29d5f6a26 需求 1 тиждень тому
  ‘linchangsheng’ 13154e15b2 需求 1 тиждень тому
  ‘linchangsheng’ 414fd17aea 需求 1 тиждень тому

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

@@ -88,7 +88,6 @@ public class CommonLogic {
             token = request.getParameter("x-token");
         }
 
-        log.info("打印token:"+token);
         AdminCompanyWechat adminCompanyWechat;
         User user = null;
 

+ 3 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/order/PayOrderLogic.java

@@ -1224,6 +1224,9 @@ public class PayOrderLogic {
 
         WorkerOrder workerOrder = workerOrderService.getById(orderId);
 
+        if (workerOrder == null)
+            throw new RemoteServiceException("单号已变更,请刷新数据");
+
         AdminWebsit adminWebsit = adminWebsitService.getById(workerOrder.getWebsitId());
 
         if (StringUtil.isEmpty(adminWebsit.getPayWorkerCodeId()))

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

@@ -788,7 +788,18 @@ public class WorkerLogic {
         List<String> collect = websitUsers.stream()
                 .map(WebsitUser::getWebsitId).collect(Collectors.toList());
 
-        List<PolicyWebsit> policyWebsits = policyWebsitService.lambdaQuery().in(PolicyWebsit::getWebsitId,collect ).list();
+        List<Policy> policies = policyService.lambdaQuery().eq(Policy::getType, "DS")
+                .ge(Policy::getEndTime, new Date())
+                .list();
+
+        if (CollectionUtils.isEmpty(policies))
+            return new ArrayList<>();
+
+        List<PolicyWebsit> policyWebsits = policyWebsitService.lambdaQuery()
+                .in(PolicyWebsit::getWebsitId,collect )
+                .in(PolicyWebsit::getPolicyId,policies.stream()
+                        .map(Policy::getId).collect(Collectors.toList()) )
+                .list();
 
         if (CollectionUtils.isEmpty(policyWebsits))
             return new ArrayList<>();
@@ -804,8 +815,14 @@ public class WorkerLogic {
 
         if (policy == null)
             return new ArrayList<>();
+
+
         for (WebsitUser websitUser : websitUsers) {
 
+            if ( policyWebsits.stream().filter(item ->item.getWebsitId().equals(websitUser.getWebsitId())).count() <1) {
+                continue;
+            }
+
             if (  policyOrderService.lambdaQuery()
                     .eq(PolicyOrder::getWebsitUserId,websitUser.getId())
                     .eq(PolicyOrder::getType,"DS")