mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-13 02:25:06 +08:00
1. 修复用户 APP 发送短信验证码报错
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user