Jelajahi Sumber

岸线定时刷新服务

zoro 10 bulan lalu
induk
melakukan
4399a25f29

+ 3 - 2
src/main/java/tech/powerjob/work/service/impl/ShorelineManageInfoServiceImpl.java

@@ -6,6 +6,7 @@ import org.springframework.stereotype.Service;
 import tech.powerjob.work.entity.ShorelineManageInfo;
 import tech.powerjob.work.mapper.ShorelineManageInfoMapper;
 import tech.powerjob.work.service.ShorelineManageInfoService;
+import tech.powerjob.work.util.ReturnMsg;
 import tech.powerjob.worker.core.processor.ProcessResult;
 
 import javax.annotation.Resource;
@@ -39,10 +40,10 @@ public class ShorelineManageInfoServiceImpl extends ServiceImpl<ShorelineManageI
             boolean updated = this.updateBatchById(shorelineManageInfos);
             if (updated) {
                 log.info("本次更新数据内容{}", shorelineManageInfos);
-                return new ProcessResult(true,"更新完成");
+                return ReturnMsg.returnMsg(true,"更新成功");
             } else {
                 log.error("更新失败");
-                return new ProcessResult(false,"更新失败");
+                return ReturnMsg.returnMsg(false,"更新失败");
             }
         }
     }

+ 14 - 0
src/main/java/tech/powerjob/work/util/ReturnMsg.java

@@ -0,0 +1,14 @@
+package tech.powerjob.work.util;
+
+import tech.powerjob.worker.core.processor.ProcessResult;
+
+public class ReturnMsg extends ProcessResult {
+
+    public static ProcessResult returnMsg(Boolean isSuccess, String msg) {
+        return new ProcessResult(isSuccess, msg);
+    }
+
+    public static ProcessResult returnMsg(Boolean isSuccess) {
+        return new ProcessResult(isSuccess);
+    }
+}

+ 2 - 2
src/main/resources/application.properties

@@ -19,9 +19,9 @@ powerjob.worker.protocol=http
 powerjob.worker.max-result-length=4096
 # Max length of appended workflow context . Appended workflow context value that is longer than the value will be ignore.
 powerjob.worker.max-appended-wf-context-length=4096
-spring.datasource.url=jdbc:kingbase8://10.83.240.181:54322/kingbase
+spring.datasource.url=jdbc:kingbase8://174.0.123.203:54323/kingbase
 spring.datasource.username=system
-spring.datasource.password=Ghzx2023!
+spring.datasource.password=12345678ab
 spring.datasource.driver-class-name=com.kingbase8.Driver
 spring.datasource.hikari.maximum-pool-size=60
 spring.datasource.hikari.maximum-idle=15