package com.sinata.rest.modular.mall.job;
|
|
import com.sinata.common.enums.EnumMemberGrade;
|
import com.sinata.common.enums.EnumSystemSetKey;
|
import com.sinata.rest.modular.member.service.IMemUserService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* 定时任务-品行分检测
|
*/
|
@Slf4j
|
@Component
|
@EnableScheduling
|
public class CheckCreditScoreWork {
|
|
@Autowired
|
IMemUserService memUserService;
|
|
/**
|
* 品行分检测-1分钟执行1次
|
*/
|
@Scheduled(cron = "0 */1 * * * *")
|
public void run() {
|
log.debug("品行分检测");
|
// 黄金营销员检测
|
memUserService.updateUserGradeByCreditScore(EnumSystemSetKey.SET_305.index, EnumMemberGrade.G_3.index, EnumMemberGrade.G_1.index);
|
|
// 城市合伙人检测
|
memUserService.updateUserGradeByCreditScore(EnumSystemSetKey.SET_328.index, EnumMemberGrade.G_4.index, EnumMemberGrade.G_3.index);
|
|
// 市场总监检测
|
memUserService.updateUserGradeByCreditScore(EnumSystemSetKey.SET_348.index, EnumMemberGrade.G_5.index, EnumMemberGrade.G_3.index);
|
}
|
|
}
|