新增管理后台对用户信息相关操作

This commit is contained in:
jwf1173
2020-05-12 17:56:31 +08:00
parent 6d86e349ef
commit a29fb12b8a
19 changed files with 534 additions and 2 deletions

View File

@@ -88,6 +88,11 @@ public enum SystemErrorCodeEnum implements ServiceExceptionUtil.Enumerable {
USER_ADDRESS_IS_DELETED(1001004001, "用户地址已被删除!"),
USER_GET_ADDRESS_NOT_EXISTS(1001004002, "获取的地址不存在!"),
// ========== 用户信息模块 1004004100 ==========
USER_NOT_EXISTS(1004004100, "用户不存在"),
USER_STATUS_NOT_EXISTS(1004004101, "用户状态不存在"),
USER_STATUS_EQUALS(1004004101, "用户已经是该状态"),
// ========== 错误码模块 1002009000 ==========
ERROR_CODE_NOT_EXISTS(1002009000, "错误码不存在"),
ERROR_CODE_DUPLICATE(1002009001, "已经存在编码为【{}}】的错误码"),

View File

@@ -0,0 +1,46 @@
package cn.iocoder.mall.system.biz.enums.user;
import cn.iocoder.common.framework.core.IntArrayValuable;
import java.util.Arrays;
/**
* @Author: jiangweifan
* @Date: 2020/5/12
* @Description: 用户状态枚举
*/
public enum UserStatusEnum implements IntArrayValuable {
ENABLED(1, "启用"),
DISABLED(2, "禁用");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserStatusEnum::getStatus).toArray();
/**
* 状态
*/
private final Integer status;
/**
* 描述
*/
private final String name;
UserStatusEnum(Integer status, String name) {
this.status = status;
this.name = name;
}
public Integer getStatus() {
return status;
}
public String getName() {
return name;
}
@Override
public int[] array() {
return ARRAYS;
}
}