|
@@ -2,6 +2,8 @@ package com.persagy.job;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.date.TimeInterval;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.persagy.constant.CommonConst;
|
|
|
import com.persagy.entity.NettyMessage;
|
|
|
import com.persagy.netty.client.NettyClient;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -9,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
/**
|
|
@@ -28,6 +31,10 @@ public class SpringSchedule {
|
|
|
@Scheduled(cron = "${alarm.get.all.alarmdefine.cron}")
|
|
|
public void allResetCron() throws InterruptedException {
|
|
|
NettyMessage message = new NettyMessage(4);
|
|
|
+ JSONObject content = new JSONObject();
|
|
|
+ content.put("groupCode", CommonConst.groupCode);
|
|
|
+ content.put("projectId", CommonConst.projectId);
|
|
|
+ message.setContent(Arrays.asList(content));
|
|
|
nettyClient.sendMessage(message);
|
|
|
}
|
|
|
|