Authored by 胡古飞

fix Account

... ... @@ -35,19 +35,21 @@ 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();
pm.getCmHost().setHost("211.147.239.62", 20506);// 设置网关的IP和port,用于发送信息
... ... @@ -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());
... ...