feat: 每个自然月重置优质标准
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
package com.jero.modules.laws.enterprise.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class QualityStandardResetTask {
|
||||
|
||||
@Resource
|
||||
private EnterpriseStandardPlanService enterpriseStandardPlanService;
|
||||
|
||||
@Scheduled(cron = "0 0 0 1 * ?")
|
||||
public void qualityStandardResetTask() {
|
||||
LambdaUpdateWrapper<EnterpriseStandardPlan> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.set(EnterpriseStandardPlan::getQualityFlag, 0);
|
||||
enterpriseStandardPlanService.update(updateWrapper);
|
||||
log.info("重置优质企标状态完成");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user