|
|
@@ -640,9 +640,17 @@ public class SmsServiceImpl implements ISmsService
|
|
|
SysConfig sysConfig = sysConfigMapper.selectConfigByConfigKey("his.sms");
|
|
|
FsSmsConfig sms = JSON.parseObject(sysConfig.getConfigValue(), FsSmsConfig.class);
|
|
|
if (sms.getType().equals("rf")) {
|
|
|
+
|
|
|
try {
|
|
|
content = content.replace("${sms.sign}",sms.getRfSign());
|
|
|
- urls = sms.getRfUrl1() + "sms?action=send&account=" + sms.getRfAccount1() + "&password=" + sms.getRfPassword1() + "&mobile=" + phone + "&content=" + URLEncoder.encode(content, "UTF-8") + "&extno=" + sms.getRfCode1() + "&rt=json";
|
|
|
+ if (temp.getTempType().equals(1)) {
|
|
|
+ urls = sms.getRfUrl1() + "sms?action=send&account=" + sms.getRfAccount1() + "&password=" + sms.getRfPassword1() + "&mobile=" + phone + "&content=" + URLEncoder.encode(sms.getRfSign() + content, "UTF-8") + "&extno=" + sms.getRfCode1() + "&rt=json";
|
|
|
+ } else if (temp.getTempType().equals(2)) {
|
|
|
+ urls = sms.getRfUrl2() + "sms?action=send&account=" + sms.getRfAccount2() + "&password=" + sms.getRfPassword2() + "&mobile=" + phone + "&content=" + URLEncoder.encode(sms.getRfSign() + content + "拒收请回复R", "UTF-8") + "&extno=" + sms.getRfCode2() + "&rt=json";
|
|
|
+ }
|
|
|
+ if(StringUtils.isEmpty(urls)){
|
|
|
+ urls = sms.getRfUrl1() + "sms?action=send&account=" + sms.getRfAccount1() + "&password=" + sms.getRfPassword1() + "&mobile=" + phone + "&content=" + URLEncoder.encode(sms.getRfSign() + content, "UTF-8") + "&extno=" + sms.getRfCode1() + "&rt=json";
|
|
|
+ }
|
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|