|
@@ -1,6 +1,7 @@
|
|
|
package com.qmth.boot.core.sms.service;
|
|
|
|
|
|
import com.qmth.boot.core.sms.api.SmsApiClient;
|
|
|
+import com.qmth.boot.core.sms.model.SmsConstants;
|
|
|
import com.qmth.boot.core.sms.model.SmsSendRequest;
|
|
|
import com.qmth.boot.core.sms.model.SmsSendResponse;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -28,13 +29,13 @@ public class SmsService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- * 往指定接口地址发送普通短信
|
|
|
+ * 往指定服务地址发送普通短信
|
|
|
*
|
|
|
- * @param url 必须是完整路径,带http或https前缀
|
|
|
+ * @param server 以http或https开头的服务地址,调用时自动拼接/api/sms/send相对路径
|
|
|
* @param request
|
|
|
* @return
|
|
|
*/
|
|
|
- public SmsSendResponse sendSms(@NotBlank String url, @Validated SmsSendRequest request) {
|
|
|
- return smsApiClient.sendSms(url, request);
|
|
|
+ public SmsSendResponse sendSms(@NotBlank String server, @Validated SmsSendRequest request) {
|
|
|
+ return smsApiClient.sendSms(server + SmsConstants.API_PATH_SEND_SMS, request);
|
|
|
}
|
|
|
}
|