|
@@ -0,0 +1,28 @@
|
|
|
+package com.hz.employmentsite.jobs;
|
|
|
+
|
|
|
+import com.hz.employmentsite.AppConfig;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+@Component
|
|
|
+@Slf4j
|
|
|
+public class sendWxMessageJob {
|
|
|
+ @Autowired
|
|
|
+ private AppConfig appConfig;
|
|
|
+
|
|
|
+ @Scheduled(cron="${appconfig.jobconfig.send-wxmessage-cron}")
|
|
|
+ public void syncClassData() {
|
|
|
+ if (appConfig.jobconfig_isRunJob) {
|
|
|
+ log.info("开始推送微信通知");
|
|
|
+ try {
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.info("推送微信通知数据错误:" + e.getMessage());
|
|
|
+ }
|
|
|
+ log.info("推送微信通知结束");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|