|
@@ -4,6 +4,7 @@ import com.kym.service.MpRelationService;
|
|
|
import jakarta.annotation.PostConstruct;
|
|
import jakarta.annotation.PostConstruct;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -22,9 +23,7 @@ public class MpUserRelationJob {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 每天凌晨1点执行一次
|
|
// 每天凌晨1点执行一次
|
|
|
-// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
|
|
-
|
|
|
|
|
- @PostConstruct
|
|
|
|
|
|
|
+ @Scheduled(cron = "0 0 1 * * ?")
|
|
|
public void executeMpUserRelationJob() throws WxErrorException {
|
|
public void executeMpUserRelationJob() throws WxErrorException {
|
|
|
log.info("公众号用户关联处理启动...");
|
|
log.info("公众号用户关联处理启动...");
|
|
|
mpRelationService.batchBindMpUser();
|
|
mpRelationService.batchBindMpUser();
|