Commit 7e2f1426 by 徐高华

ding

parent d24f80b6
package com.gic.haoban.manage.service.util;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.commons.util.DingtalkMessageUtil;
public class DingUtils {
private static boolean isDev = false;
static {
Config config = ConfigService.getConfig("COMMON.gic-properties");
String env = config.getProperty("environment.value", "");
isDev = !"prod".equals(env);
}
public static void send(String msg, String dingUrl, boolean skipDev) {
try {
if (skipDev && isDev) {
return;
}
if (isDev) {
msg = "【dev】" + msg;
}
DingtalkMessageUtil.sendAlertMessage(msg, dingUrl);
} catch (Exception e) {
}
}
}
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