|
@@ -26,7 +26,7 @@ import java.util.Map;
|
|
|
public class FeishuJobAlarm implements JobAlarm {
|
|
|
private static Logger logger = LoggerFactory.getLogger(FeishuJobAlarm.class);
|
|
|
|
|
|
- private static final String FEISHU_BOT = "https://open.feishu.cn/open-apis/bot/v2/hook/5091de05-970c-463a-a3cf-2e02e857d969";
|
|
|
+ private static final String FEISHU_BOT_URL = "https://open.feishu.cn/open-apis/bot/v2/hook/5091de05-970c-463a-a3cf-2e02e857d969";
|
|
|
private static final String MESSAGE_TEMPLATE = "personal:{0}\n title:{1}\n group:{2}\n id:{3}\n jobDesc:{4}\n message:{5}";
|
|
|
|
|
|
/**
|
|
@@ -70,14 +70,14 @@ public class FeishuJobAlarm implements JobAlarm {
|
|
|
Map<String, String> content = new HashMap<>();
|
|
|
content.put("text", message);
|
|
|
body.put("content", gson.toJson(content));
|
|
|
- HttpUtil.postJson(FEISHU_BOT, gson.toJson(body));
|
|
|
+ String result = HttpUtil.postJson(FEISHU_BOT_URL, gson.toJson(body));
|
|
|
+ logger.info("feishu alarm result = {}", result);
|
|
|
} catch (Exception e) {
|
|
|
+ logger.error("feishu alarm error", e);
|
|
|
alarmResult = false;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return alarmResult;
|
|
|
}
|
|
|
-
|
|
|
}
|