‘linchangsheng’ 7 months ago
parent
commit
f3c3a11662

+ 4 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/policy/AgreementLogic.java

@@ -1,6 +1,7 @@
 package com.gree.mall.manager.logic.policy;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@@ -1070,9 +1071,11 @@ public class AgreementLogic {
 
         List<WorkerPolicy> workerPolicies = workerPolicyService.lambdaQuery().in(WorkerPolicy::getWebsitUserId, websitUserIds)
                 .eq(WorkerPolicy::getPolicyType,PolicyTypeEnum.IN.getKey())
+                .eq(WorkerPolicy::getStatus,PolicyOrderStatusEnum.BZZ.getKey())
+                .ge(WorkerPolicy::getEndTime,DateUtil.offsetDay(DateUtil.endOfDay(new Date()),-3))
                 .list();
 
-        for (WebsitUser websitUser : websitUsers) {
+        for (WorkerPolicy workerPolicy : workerPolicies) {
 
         }
     }

+ 2 - 2
mall-server-api/src/main/java/com/gree/mall/manager/schedule/InsureEmailSchedule.java

@@ -25,14 +25,14 @@ public class InsureEmailSchedule {
 
 
     //每小时执行1次
-    @Scheduled(fixedDelay =60* 1000)
+   // @Scheduled(fixedDelay =60* 1000)
     public void task() throws IOException {
         agreementLogic.sendEmailSche();
     }
 
 
     //监测今天是否有回执邮件,如果有则表示今天买保险的回执成功
-    @Scheduled(fixedDelay = 60* 1000)
+   // @Scheduled(fixedDelay = 60* 1000)
     public void task2() throws IOException, MessagingException {
         agreementLogic.receEmail();
     }