...
|
...
|
@@ -35,18 +35,20 @@ public class XWSendSMSServiceImpl implements ISendSMSService { |
|
|
|
|
|
static Logger log = LoggerFactory.getLogger(XWSendSMSServiceImpl.class);
|
|
|
|
|
|
private int pageSize = 100000;
|
|
|
|
|
|
// private String smsUrl = "http://211.147.239.62:9050/cgi-bin/sendsms";
|
|
|
private Account defaultAccount = new Account("nocrm", "1qa@WS");
|
|
|
private Account marketAccount = new Account("market", "Market2017");
|
|
|
|
|
|
private PostMsg postMsg = null;
|
|
|
private PostMsg defaultPostMsg = null;
|
|
|
private PostMsg marketPostMsg = null;
|
|
|
|
|
|
@PostConstruct
|
|
|
void init() {
|
|
|
postMsg = this.createPostMsg();
|
|
|
defaultPostMsg = this.createPostMsg();
|
|
|
marketPostMsg = this.createPostMsg();
|
|
|
}
|
|
|
|
|
|
private int pageSize = 100000;
|
|
|
|
|
|
private PostMsg createPostMsg() {
|
|
|
PostMsg pm = new PostMsg();
|
...
|
...
|
@@ -54,7 +56,7 @@ public class XWSendSMSServiceImpl implements ISendSMSService { |
|
|
pm.getWsHost().setHost("211.147.239.62", 20507);// 设置网关的
|
|
|
return pm;
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public Response<SendNoticeResultBean> sendSMS(List<String> mobileList, String content, Map<String, String> params) throws Exception {
|
|
|
if (CollectionUtils.isEmpty(mobileList)) {
|
...
|
...
|
@@ -95,9 +97,11 @@ public class XWSendSMSServiceImpl implements ISendSMSService { |
|
|
|
|
|
private List<String> immediateSendSMS(List<String> mobileList, String content, Map<String, String> params) {
|
|
|
log.info("immediateSendSMS with mobile list.size={}, content={}", mobileList.size(), content);
|
|
|
PostMsg postMsg = this.defaultPostMsg;
|
|
|
Account ac = this.defaultAccount;
|
|
|
// 判断如果是市场渠道发的短信,使用市场子账号
|
|
|
if (StringUtils.equals(params.get("sendScene"), "GENERAL_SCENE")) {
|
|
|
postMsg = this.marketPostMsg;
|
|
|
ac = marketAccount;
|
|
|
}
|
|
|
log.info("sms acct name is[{}]", ac.getName());
|
...
|
...
|
|