|
@@ -1,5 +1,6 @@
|
|
package com.care.common.service.impl;
|
|
package com.care.common.service.impl;
|
|
|
|
|
|
|
|
+import com.care.common.enums.OrderTypeEnum;
|
|
import com.care.common.service.SmsSendService;
|
|
import com.care.common.service.SmsSendService;
|
|
import com.care.common.util.SmsUtil;
|
|
import com.care.common.util.SmsUtil;
|
|
import com.tencentcloudapi.sms.v20210111.models.SendStatus;
|
|
import com.tencentcloudapi.sms.v20210111.models.SendStatus;
|
|
@@ -28,6 +29,12 @@ public class SmsSendServiceImpl implements SmsSendService {
|
|
@Value("${sms.notice.templateId:#{null}}")
|
|
@Value("${sms.notice.templateId:#{null}}")
|
|
private String noticeTemplateId;
|
|
private String noticeTemplateId;
|
|
|
|
|
|
|
|
+ @Value("${sms.notice.templateid.jiuzhi:#{null}}")
|
|
|
|
+ private String noticeTemplateId4jiuzhi;
|
|
|
|
+
|
|
|
|
+ @Value("${sms.notice.templateid.diedao:#{null}}")
|
|
|
|
+ private String noticeTemplateId4diedao;
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean sendSmsToLianxiren(String phone, String params) {
|
|
public boolean sendSmsToLianxiren(String phone, String params) {
|
|
@@ -46,4 +53,28 @@ public class SmsSendServiceImpl implements SmsSendService {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean sendSmsToLianxiren(String orderType, String phone, String params) {
|
|
|
|
+ String[] _p = {params};
|
|
|
|
+ String _noticeTemplateId = noticeTemplateId;
|
|
|
|
+ if (OrderTypeEnum.DI_EDAO.getValue().equals(orderType)){
|
|
|
|
+ _noticeTemplateId = noticeTemplateId4diedao;
|
|
|
|
+ }else if(OrderTypeEnum.JIU_ZHI.getValue().equals(orderType)){
|
|
|
|
+ _noticeTemplateId = noticeTemplateId4jiuzhi;
|
|
|
|
+ }
|
|
|
|
+ SendStatus sendStatus = SmsUtil.sendSms(noticeEndpoint,
|
|
|
|
+ noticeRegion,
|
|
|
|
+ noticeSecretId,
|
|
|
|
+ noticeecretKey,
|
|
|
|
+ noticeSmsSdkAppId,
|
|
|
|
+ noticeSignName,
|
|
|
|
+ _noticeTemplateId,
|
|
|
|
+ phone,_p);
|
|
|
|
+ if (sendStatus!=null && "Ok".equals(sendStatus.getCode())){
|
|
|
|
+ return true;
|
|
|
|
+ }else{
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|