mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
1. 修复用户 APP 发送短信验证码报错
This commit is contained in:
parent
d649b93017
commit
448aa21e33
@ -304,7 +304,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
||||
@Override
|
||||
public void sendSmsCode(Long userId, AppAuthSendSmsReqVO reqVO) {
|
||||
// TODO 要根据不同的场景,校验是否有用户
|
||||
smsCodeApi.sendSmsCode(AuthConvert.INSTANCE.convert(reqVO));
|
||||
smsCodeApi.sendSmsCode(AuthConvert.INSTANCE.convert(reqVO).setCreateIp(getClientIP()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.system.enums.sms.SmsSceneEnum;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 短信验证码的发送 Request DTO
|
||||
@ -24,7 +25,7 @@ public class SmsCodeSendReqDTO {
|
||||
/**
|
||||
* 发送场景
|
||||
*/
|
||||
@NotEmpty(message = "发送场景不能为空")
|
||||
@NotNull(message = "发送场景不能为空")
|
||||
@InEnum(SmsSceneEnum.class)
|
||||
private Integer scene;
|
||||
/**
|
||||
|
@ -43,7 +43,8 @@ public enum SmsSceneEnum implements IntArrayValuable {
|
||||
}
|
||||
|
||||
public static SmsSceneEnum getCodeByScene(Integer scene) {
|
||||
return ArrayUtil.firstMatch(sceneEnum -> sceneEnum.getScene().equals(scene));
|
||||
return ArrayUtil.firstMatch(sceneEnum -> sceneEnum.getScene().equals(scene),
|
||||
values());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
// TODO 芋艿:这块的接口命名,在纠结下
|
||||
@Api(tags = "管理后台 - 短信回调")
|
||||
@RestController
|
||||
@RequestMapping("/system/sms/callback")
|
||||
|
Loading…
Reference in New Issue
Block a user