根据腾讯云的规定,验证码只能是纯数字。

pull/1/head
ZhouXY108 2022-12-12 04:01:00 +08:00
parent fc4725d932
commit 263777aa70
1 changed files with 4 additions and 3 deletions

View File

@ -6,6 +6,8 @@ import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile; import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.sms.v20210111.SmsClient; import com.tencentcloudapi.sms.v20210111.SmsClient;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest; import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -54,11 +56,10 @@ public class TencentSmsServiceImpl implements SmsService {
* client SendSms res * client SendSms res
* SendSmsResponse * SendSmsResponse
*/ */
// var res = client.SendSms(req); var res = client.SendSms(req);
client.SendSms(req);
// 输出json格式的字符串回包 // 输出json格式的字符串回包
// System.out.println(SendSmsResponse.toJsonString(res)); System.out.println(SendSmsResponse.toJsonString(res));
// 也可以取出单个值你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义 // 也可以取出单个值你可以通过官网接口文档或跳转到response对象的定义处查看返回字段的定义
// System.out.println(res.getRequestId()); // System.out.println(res.getRequestId());