| | |
| | | package com.iailab.module.system.enums.sms; |
| | | |
| | | import cn.hutool.core.util.ArrayUtil; |
| | | import com.iailab.framework.common.core.IntArrayValuable; |
| | | import com.iailab.framework.common.core.ArrayValuable; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
| | | |
| | |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum SmsSceneEnum implements IntArrayValuable { |
| | | public enum SmsSceneEnum implements ArrayValuable { |
| | | |
| | | MEMBER_LOGIN(1, "user-sms-login", "会员用户 - 手机号登陆"), |
| | | MEMBER_UPDATE_MOBILE(2, "user-update-mobile", "会员用户 - 修改手机"), |
| | |
| | | |
| | | ADMIN_MEMBER_LOGIN(21, "admin-sms-login", "后台用户 - 手机号登录"); |
| | | |
| | | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(SmsSceneEnum::getScene).toArray(); |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(SmsSceneEnum::getScene).toArray(Integer[]::new); |
| | | |
| | | /** |
| | | * 验证场景的编号 |
| | |
| | | private final String description; |
| | | |
| | | @Override |
| | | public int[] array() { |
| | | public Integer[] array() { |
| | | return ARRAYS; |
| | | } |
| | | |