|
|
@@ -0,0 +1,34 @@
|
|
|
+package cn.iocoder.yudao.module.iscs.job;
|
|
|
+
|
|
|
+import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
|
|
|
+import cn.iocoder.yudao.framework.tenant.core.job.TenantJob;
|
|
|
+import cn.iocoder.yudao.module.iscs.service.notifyconfig.NotifyMessagePlanService;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 计划发送站内信机制
|
|
|
+ *
|
|
|
+ * @author cgj
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Component
|
|
|
+public class PlanSendMessJob implements JobHandler {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private NotifyMessagePlanService notifyMessagePlanService;
|
|
|
+ /**
|
|
|
+ * 扫描定时发送的消息
|
|
|
+ *
|
|
|
+ * @param param 参数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @TenantJob
|
|
|
+ public String execute(String param) {
|
|
|
+ Integer i = notifyMessagePlanService.checkPlanSend();
|
|
|
+ return String.format("扫描发送站内信[" + i + "]条!");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|