Commit 873d1af5 authored by 郭武斌's avatar 郭武斌

*)修改发送短信

parent bcbf8365
...@@ -2,10 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.biz.rule.action; ...@@ -2,10 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
import javax.annotation.PostConstruct;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -84,19 +84,35 @@ public class AlertCalledAction { ...@@ -84,19 +84,35 @@ public class AlertCalledAction {
List<Long> seqs = StringUtil.String2LongList(sendIds); List<Long> seqs = StringUtil.String2LongList(sendIds);
if (ValidationUtil.isEmpty(seqs)) if (ValidationUtil.isEmpty(seqs))
{ {
//构建短信参数 //构建短信参数
HashMap<String, String> smsParams = new HashMap<String, String>(); HashMap<String, String> smsParams = new HashMap<String, String>();
smsParams.put("smsCode", smsCode);
Map<String, String> objectMap = JSON.parseObject(JSON.toJSONString(object), HashMap.class); Map<String, String> objectMap = JSON.parseObject(JSON.toJSONString(object), HashMap.class);
smsParams.putAll(objectMap); smsParams.putAll(objectMap);
//查询人员手机号
//发送短信 Set<String> mobiles = new HashSet<>();
List<OrgUsrDto> orgUsrDtos = orgUsrService.queryBatchSeq(seqs); List<OrgUsrDto> orgUsrDtos = orgUsrService.queryBatchSeq(seqs);
for (OrgUsrDto orgUsrDto : orgUsrDtos) for (OrgUsrDto orgUsrDto : orgUsrDtos)
{ {
// smsParams.put("mobile", orgUsrDto.ge); // mobiles.add(e);
}
//发送短信
sendAlertCalleCmd(smsCode, mobiles, smsParams);
}
}
public void sendAlertCalleCmd(String smsCode, Set<String> mobiles, HashMap<String, String> smsParams)
{
if (!ValidationUtil.isEmpty(mobiles))
{
//构建短信参数
smsParams.put("smsCode", smsCode);
for (String mobile : mobiles)
{
smsParams.put("mobile", mobile);
//发送短信
Systemctl.smsClient.sendCommonSms(smsParams); Systemctl.smsClient.sendCommonSms(smsParams);
} }
......
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