|
@@ -828,14 +828,15 @@ public class WorkerLogic {
|
|
|
return new Page<>();
|
|
|
|
|
|
|
|
|
- PolicyOrder policyOrder = policyOrderService
|
|
|
+ List<PolicyOrder> policyOrderList = policyOrderService
|
|
|
.lambdaQuery()
|
|
|
.eq(PolicyOrder::getType, "DS")
|
|
|
.isNotNull(PolicyOrder::getEndTime)
|
|
|
.eq(PolicyOrder::getIsPay, IsYesNoEnum.YES.getKey())
|
|
|
.eq(PolicyOrder::getWebsitUserId, websitUser.getId())
|
|
|
.orderByDesc(PolicyOrder::getEndTime)
|
|
|
- .last("limit 1").one();
|
|
|
+ .list();
|
|
|
+
|
|
|
|
|
|
List<PolicyOrder> policyOrders = policyOrderService
|
|
|
.lambdaQuery()
|
|
@@ -850,8 +851,8 @@ public class WorkerLogic {
|
|
|
|
|
|
|
|
|
Page<Policy> page = policyService.lambdaQuery()
|
|
|
- .notIn(policyOrder == null && CollectionUtil.isNotEmpty(policyOrders), Policy::getId, policyIds)
|
|
|
- .ge(policyOrder != null && policyOrder.getEndTime() != null, Policy::getEndTime, policyOrder.getEndTime())
|
|
|
+ .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())
|