jekins 推送测试

This commit is contained in:
Leo
2023-11-28 17:03:17 +08:00
parent e63ec8f0a4
commit c1018a19c0
2 changed files with 30 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ public class WXController {
return R.error("缺少标题和内容");
}
String result = WxSendUtil.sendNotify("("+sourceForQL+") "+message.getTitle(), message.getText(), message.getTouser(), WXMessageType.QL);
logger.info("result 打印---{}",result);
return R.ok(result);
}

View File

@@ -0,0 +1,29 @@
package cn.van333.wxsend.util;
/**
* @author Leo
* @version 1.0
* @create 2023/10/09 0009 下午 02:48
* @description
*/
public class SourceForQLUtil {
private static final String QH = "QH";
private static final String QH_UBUNTU = "QH_UBUNTU";
public static final String XZJ_UBUNTU = "XZJ_UBUNTU";
public static String transferSource(String source){
if (source.equals(QH)){
return "群晖";
}else if (source.equals(QH_UBUNTU)){
return "群晖-Ubuntu";
}else if (source.equals(XZJ_UBUNTU)){
return "小主机-Ubuntu";
}else {
return "未知";
}
}
}