This commit is contained in:
qitz
2023-10-17 22:22:42 +08:00
3 changed files with 6 additions and 5 deletions
@@ -11,7 +11,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
public interface WeChatUserService {
String sendCode(WeChatUserVO userVO);
AjaxResult sendCode(WeChatUserVO userVO);
AjaxResult registerUser(IdentityAuthentication ientityAuthentication);
@@ -53,7 +53,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
private IdentityAuthenticationMapper identityAuthenticationMapper;
@Override
public String sendCode(WeChatUserVO userVO) {
public AjaxResult sendCode(WeChatUserVO userVO) {
Random random = new Random();
String code = "";
@@ -69,9 +69,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
Boolean flag = SmsUtils.sendSms(request);
if(flag){
setCodeCache(userVO.getPhone(),code);
return "短信发送成功";
return AjaxResult.success("短信发送成功");
}else {
return AjaxResult.warn("短信发送失败");
}
return "短信发送失败";
}
/**
* 设置验证码缓存