短信发送
This commit is contained in:
@@ -48,7 +48,7 @@ public class MsgApi {
|
||||
|
||||
/**
|
||||
* @param channels 推送渠道 (INNER:站内消息; SMS:短信; Mail:邮件; WeChat:微信; DingTalk:钉钉;同时推送多个渠道用英文逗号分隔 )
|
||||
* @param loginNames 字符串,多个工号用英文逗号分隔 ","
|
||||
* @param loginNameStr 字符串,多个工号用英文逗号分隔 ","
|
||||
* @param mtype 消息类型; 0: 图文 1: 文字 2: 外链
|
||||
* @param title 标题
|
||||
* @param content 内容
|
||||
@@ -56,7 +56,7 @@ public class MsgApi {
|
||||
* @author zhf
|
||||
* @description
|
||||
*/
|
||||
public void sendMsg(List<String> channels, String loginNames, Integer mtype, String title, String content, String imageUrl,String link) {
|
||||
public void sendMsg(List<String> channels, String loginNameStr, Integer mtype, String title, String content, String imageUrl,String link) {
|
||||
try {
|
||||
if (!Globals.MyConfig.getBoolean("SendMsg")) {
|
||||
log.info("发送失败,消息暂未开启!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
@@ -68,7 +68,7 @@ public class MsgApi {
|
||||
return;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(title)||StrUtil.isBlank(content) ||Lang.isEmpty(channels) || Lang.isEmpty(loginNames)) {
|
||||
if (StrUtil.isBlank(title)||StrUtil.isBlank(content) ||Lang.isEmpty(channels) || Lang.isEmpty(loginNameStr)) {
|
||||
log.info("发送失败,缺少需要参数请检查!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
return;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class MsgApi {
|
||||
map.put("channel", String.join(",", channels));
|
||||
//推送范围(1:普通模式;2:全体教师;3:全体学生;4:全体人员)
|
||||
map.put("objScope", 1);
|
||||
map.put("objIds", loginNames);
|
||||
map.put("objIds", loginNameStr);
|
||||
map.put("mtype", mtype);
|
||||
map.put("sendStatus", 1);
|
||||
map.put("title", title);
|
||||
|
||||
Reference in New Issue
Block a user