|
|
@@ -0,0 +1,30 @@
|
|
|
+package org.dromara.job.snailjob;
|
|
|
+
|
|
|
+import com.aizuda.snailjob.client.job.core.annotation.JobExecutor;
|
|
|
+import com.aizuda.snailjob.client.model.ExecuteResult;
|
|
|
+import com.aizuda.snailjob.common.log.SnailJobLog;
|
|
|
+import com.inspur.device.service.ISmsbDeviceChatRecordService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 同步dify平台对话内容
|
|
|
+ *
|
|
|
+ * @author lihao16
|
|
|
+ */
|
|
|
+@Component
|
|
|
+@JobExecutor(name = "SyncChatRecord")
|
|
|
+public class SyncChatRecordExecutor {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISmsbDeviceChatRecordService smsbDeviceChatRecordService;
|
|
|
+
|
|
|
+ public ExecuteResult jobExecute() {
|
|
|
+ SnailJobLog.REMOTE.info("syncChatRecord job start...");
|
|
|
+ boolean syncResult = smsbDeviceChatRecordService.syncRecordFromDify();
|
|
|
+ SnailJobLog.REMOTE.info("syncChatRecord job end... syncResult = " + syncResult);
|
|
|
+ return ExecuteResult.success("syncChatRecord job execute success");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|