fix(sms):修复短信验证码发送逻辑

This commit is contained in:
huk 2025-09-27 15:19:36 +08:00
parent 9190b6e6b2
commit 86b14817fd

View File

@ -65,7 +65,7 @@ public class CaptchaController {
// 验证码模板id 自行处理 (查数据库或写死均可)
String templateId = "2375314";
LinkedHashMap<String, String> map = new LinkedHashMap<>(1);
// map.put("code", code);
map.put("code", code);
SmsBlend smsBlend = SmsFactory.getSmsBlend("config2");
SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, templateId, map);
if (!smsResponse.isSuccess()) {
@ -73,7 +73,7 @@ public class CaptchaController {
return R.fail(smsResponse.getData().toString());
}
log.info("{}:验证码发送成功,验证码为:{}", phonenumber, code);
return R.ok("ok", code);
return R.ok("ok");
}
/**