|
@@ -1,12 +1,14 @@
|
|
package com.qmth.boot.core.sms.api;
|
|
package com.qmth.boot.core.sms.api;
|
|
|
|
|
|
import com.qmth.boot.core.retrofit.annotatioin.RetrofitClient;
|
|
import com.qmth.boot.core.retrofit.annotatioin.RetrofitClient;
|
|
|
|
+import com.qmth.boot.core.retrofit.utils.SignatureInfo;
|
|
import com.qmth.boot.core.sms.config.SmsApiConfiguration;
|
|
import com.qmth.boot.core.sms.config.SmsApiConfiguration;
|
|
import com.qmth.boot.core.sms.model.SmsConstants;
|
|
import com.qmth.boot.core.sms.model.SmsConstants;
|
|
import com.qmth.boot.core.sms.model.SmsSendRequest;
|
|
import com.qmth.boot.core.sms.model.SmsSendRequest;
|
|
import com.qmth.boot.core.sms.model.SmsSendResponse;
|
|
import com.qmth.boot.core.sms.model.SmsSendResponse;
|
|
import retrofit2.http.Body;
|
|
import retrofit2.http.Body;
|
|
import retrofit2.http.POST;
|
|
import retrofit2.http.POST;
|
|
|
|
+import retrofit2.http.Tag;
|
|
import retrofit2.http.Url;
|
|
import retrofit2.http.Url;
|
|
|
|
|
|
@RetrofitClient(configuration = SmsApiConfiguration.class)
|
|
@RetrofitClient(configuration = SmsApiConfiguration.class)
|
|
@@ -20,6 +22,16 @@ public interface SmsApiClient {
|
|
@POST(SmsConstants.API_PATH_SEND_SMS)
|
|
@POST(SmsConstants.API_PATH_SEND_SMS)
|
|
SmsSendResponse sendSms(@Body SmsSendRequest request);
|
|
SmsSendResponse sendSms(@Body SmsSendRequest request);
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 使用机构鉴权发送普通短信
|
|
|
|
+ *
|
|
|
|
+ * @param signature 使用机构AK构造Secret类型签名
|
|
|
|
+ * @param request 请求体
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @POST(SmsConstants.API_PATH_SEND_SMS)
|
|
|
|
+ SmsSendResponse sendSms(@Tag SignatureInfo signature, @Body SmsSendRequest request);
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 往指定接口地址发送普通短信
|
|
* 往指定接口地址发送普通短信
|
|
* url必须是完整路径,带http或https前缀
|
|
* url必须是完整路径,带http或https前缀
|