|
@@ -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<>();
|