111
k94314517
2024-01-24 0c009141867c996897928c4f12490f21b78222f2
server/platform/src/main/java/com/doumee/task/ScheduleTool.java
@@ -1,7 +1,9 @@
package com.doumee.task;
import com.doumee.dao.business.model.InsuranceApply;
import com.doumee.service.business.CompanyService;
import com.doumee.service.business.InsuranceApplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -20,6 +22,11 @@
public class ScheduleTool {
    @Autowired
    private CompanyService companyService;
    @Autowired
    private InsuranceApplyService insuranceApplyService;
    /**
     * @throws Exception
     */
@@ -39,4 +46,17 @@
        log.info("==============定时上传待上传的企业电子印章数据======end=======");
    }
    /**
     * 定时更新保单金额 每天凌晨 12.05 分执行
     * @throws Exception
     */
    @Scheduled(cron = " 0 5 00 * * ?")
    public void updateApplyCurrentFee(){
        log.info("==============定时更新保单实际金额=======start======");
        insuranceApplyService.updateApplyCurrentFee();
        log.info("==============定时更新保单实际金额======end=======");
    }
}