记得上下班打卡 | git大法好,push需谨慎

Commit b5e0aa3b authored by wangyifan's avatar wangyifan

配置报警机器人报警链接

parent 201024ba
...@@ -22,3 +22,5 @@ liquidnet: ...@@ -22,3 +22,5 @@ liquidnet:
localUrl: ${liquidnet.service.kylin.url-pay.localUrl} localUrl: ${liquidnet.service.kylin.url-pay.localUrl}
adam: adam:
url: ${liquidnet.service.adam.url} url: ${liquidnet.service.adam.url}
feishu:
bWebhook: "https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555"
...@@ -21,4 +21,6 @@ liquidnet: ...@@ -21,4 +21,6 @@ liquidnet:
check: ${liquidnet.service.kylin.url-pay.check} check: ${liquidnet.service.kylin.url-pay.check}
localUrl: ${liquidnet.service.kylin.url-pay.localUrl} localUrl: ${liquidnet.service.kylin.url-pay.localUrl}
adam: adam:
url: ${liquidnet.service.adam.url} url: ${liquidnet.service.adam.url}
\ No newline at end of file feishu:
bWebhook: "https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555"
\ No newline at end of file
...@@ -21,4 +21,6 @@ liquidnet: ...@@ -21,4 +21,6 @@ liquidnet:
check: ${liquidnet.service.kylin.url-pay.check} check: ${liquidnet.service.kylin.url-pay.check}
localUrl: ${liquidnet.service.kylin.url-pay.localUrl} localUrl: ${liquidnet.service.kylin.url-pay.localUrl}
adam: adam:
url: ${liquidnet.service.adam.url} url: ${liquidnet.service.adam.url}
\ No newline at end of file feishu:
bWebhook: "https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555"
\ No newline at end of file
...@@ -21,4 +21,6 @@ liquidnet: ...@@ -21,4 +21,6 @@ liquidnet:
check: ${liquidnet.service.kylin.url-pay.check} check: ${liquidnet.service.kylin.url-pay.check}
localUrl: ${liquidnet.service.kylin.url-pay.localUrl} localUrl: ${liquidnet.service.kylin.url-pay.localUrl}
adam: adam:
url: ${liquidnet.service.adam.url} url: ${liquidnet.service.adam.url}
\ No newline at end of file feishu:
bWebhook: "https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555"
...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.service.impl; ...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.service.impl;
import com.liquidnet.commons.lang.util.HttpUtil; import com.liquidnet.commons.lang.util.HttpUtil;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.kylin.service.IFeishuBotService; import com.liquidnet.service.kylin.service.IFeishuBotService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
...@@ -11,6 +12,8 @@ import java.util.Map; ...@@ -11,6 +12,8 @@ import java.util.Map;
@Service @Service
public class FeishuBotServiceImpl implements IFeishuBotService { public class FeishuBotServiceImpl implements IFeishuBotService {
@Value("${liquidnet.feishu.bWebhook}")
private String bWebhook;
@Override @Override
public void sendTextMessage(String text) { public void sendTextMessage(String text) {
...@@ -21,7 +24,6 @@ public class FeishuBotServiceImpl implements IFeishuBotService { ...@@ -21,7 +24,6 @@ public class FeishuBotServiceImpl implements IFeishuBotService {
bodyMap.put("msg_type", "text"); bodyMap.put("msg_type", "text");
bodyMap.put("content", textMap); bodyMap.put("content", textMap);
HttpUtil.postJson("https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555", HttpUtil.postJson(bWebhook, JsonUtils.toJson(bodyMap));
JsonUtils.toJson(bodyMap));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment