‘linchangsheng’ 6 روز پیش
والد
کامیت
86a5d410d7
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

+ 3 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

@@ -850,12 +850,13 @@ public class WorkerLogic {
         List<String> policyIds = policyOrders.stream().map(PolicyOrder::getPolicyId).collect(Collectors.toList());
 
 
+        boolean notEmpty = CollectionUtil.isNotEmpty(policyOrderList);
+
         Page<Policy> page = policyService.lambdaQuery()
                 .notIn(CollectionUtil.isEmpty(policyOrderList) && CollectionUtil.isNotEmpty(policyOrders), Policy::getId, policyIds)
-                .ge(CollectionUtil.isNotEmpty(policyOrderList), Policy::getEndTime, policyOrderList.get(0).getEndTime())
                 .eq(Policy::getIsBuy, IsYesNoEnum.YES.getKey())
                 .le(Policy::getPolicyStartTime, new Date())
-                .ge(Policy::getEndTime, new Date())
+                .ge(Policy::getEndTime, notEmpty?policyOrderList.get(0).getEndTime():new Date())
                 .in(Policy::getId, policyWebsits.stream().map(PolicyWebsit::getPolicyId).collect(Collectors.toList()))
                 .orderByAsc(Policy::getEndTime)
                 .page(new Page<>(pageNum, pageSize));