You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.0 KiB
66 lines
2.0 KiB
3 years ago
|
/*
|
||
|
* Copyright (C), 2018-2021
|
||
|
* Project: starter
|
||
|
* FileName: DingTalkLogUtil
|
||
|
* Author: Louis
|
||
|
* Date: 2021/6/24 22:29
|
||
|
*/
|
||
|
package com.fr.plugin.xxxx.dingtalksyn.utils;
|
||
|
|
||
|
import com.fanruan.api.log.LogKit;
|
||
|
import com.fr.plugin.xxxx.dingtalksyn.config.DingSynConfig;
|
||
|
import com.fr.plugin.xxxx.dingtalksyn.config.DingTalkMemberManagementConfig;
|
||
|
|
||
|
/**
|
||
|
* <Function Description><br>
|
||
|
* <DingTalkLogUtil>
|
||
|
*
|
||
|
* @author fr.open
|
||
|
* @since 1.0.0
|
||
|
*/
|
||
|
public class DingTalkLogUtil {
|
||
|
public DingTalkLogUtil() {
|
||
|
}
|
||
|
|
||
|
public static String getMatchWay() {
|
||
|
DingTalkMemberManagementConfig var0 = DingSynConfig.getInstance().getMemberManagementConfig();
|
||
|
switch (var0.getMatchingFSWay()) {
|
||
|
case 0:
|
||
|
return "工号匹配";
|
||
|
case 1:
|
||
|
return "手机号匹配";
|
||
|
case 2:
|
||
|
return "手动匹配";
|
||
|
case 3:
|
||
|
return "数据集匹配";
|
||
|
default:
|
||
|
return "";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static String transformMessageType(int msgType) {
|
||
|
switch (msgType) {
|
||
|
case 0:
|
||
|
default:
|
||
|
return "未知消息类型";
|
||
|
case 1:
|
||
|
return "链接消息";
|
||
|
case 2:
|
||
|
return "图文消息";
|
||
|
case 3:
|
||
|
return "文件消息";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static void warn(String msg, int errorCode) {
|
||
|
LogKit.warn(msg + ",错误码为:" + errorCode + ",更多信息请参考" + "https://help.fanruan.com/finereport/doc-view-4051.html");
|
||
|
}
|
||
|
|
||
|
public static void error(String msg, int errorCode) {
|
||
|
error(msg, (Exception) null, errorCode);
|
||
|
}
|
||
|
|
||
|
public static void error(String msg, Exception e, int errorCode) {
|
||
|
LogKit.error(msg + ",错误码为:" + errorCode + ",更多信息请参考" + "https://help.fanruan.com/finereport/doc-view-4051.html", e);
|
||
|
}
|
||
|
}
|