|
@@ -10,6 +10,7 @@ import com.fs.common.core.domain.entity.SysDictData;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
|
|
|
|
|
import com.fs.common.service.ISmsService;
|
|
import com.fs.common.service.ISmsService;
|
|
|
|
|
+import com.fs.common.utils.CloudHostUtils;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.vo.SmsNotifyVO;
|
|
import com.fs.common.vo.SmsNotifyVO;
|
|
@@ -655,13 +656,24 @@ public class SmsServiceImpl implements ISmsService
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
content = content.replace("${sms.sign}",sms.getRfSign());
|
|
content = content.replace("${sms.sign}",sms.getRfSign());
|
|
|
- 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, "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";
|
|
|
|
|
|
|
+ if(CloudHostUtils.hasCloudHostName("鸿森堂")){
|
|
|
|
|
+ if (temp.getTempType().equals(1)) {
|
|
|
|
|
+ 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";
|
|
|
|
|
+ } else if (temp.getTempType().equals(2)) {
|
|
|
|
|
+ urls = sms.getRfUrl2() + "sms?action=send&account=" + sms.getRfAccount2() + "&password=" + sms.getRfPassword2() + "&mobile=" + phone + "&content=" + URLEncoder.encode(content, "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(content, "UTF-8") + "&extno=" + sms.getRfCode1() + "&rt=json";
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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, "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) {
|
|
} catch (UnsupportedEncodingException e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|