|
|
@@ -25,10 +25,9 @@ import java.time.ZoneOffset;
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
public class AliSmsService implements SmsService {
|
|
|
- @Value("${aliyun.access-key-id}")
|
|
|
- private String accessKeyId;
|
|
|
- @Value("${aliyun.access-key-secret}")
|
|
|
- private String accessKeySecret;
|
|
|
+ private final String accessKeyId = "LTAI5tEL3wr9XeiyseqKLrEK";
|
|
|
+ private final String accessKeySecret = "I9JzOThjzeJMcpVf6melaMY3nt7ucU";
|
|
|
+
|
|
|
@Autowired
|
|
|
private SmsRecordRepo smsRecordRepo;
|
|
|
|
|
|
@@ -54,7 +53,7 @@ public class AliSmsService implements SmsService {
|
|
|
request.putQueryParameter("PhoneNumbers", phone);
|
|
|
request.putQueryParameter("SignName", Constants.SMS_SIGN_NAME);
|
|
|
request.putQueryParameter("TemplateCode", Constants.SMS_TEMPLATE_CODE_GENERIC);
|
|
|
- request.putQueryParameter("TemplateParam", "{\"code\":\"" + code + "\"}");
|
|
|
+ request.putQueryParameter("TemplateParam", "{\"code\":\"" + code + "\",\"product\":\"用户\"}");
|
|
|
try {
|
|
|
CommonResponse response = client.getCommonResponse(request);
|
|
|
if (response.getHttpStatus() != 200) {
|