数据字典模块部分提交
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.mall.admin.api;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.admin.api.bo.DataDictBO;
|
||||
import cn.iocoder.mall.admin.api.dto.DataDictAddDTO;
|
||||
import cn.iocoder.mall.admin.api.dto.DataDictUpdateDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DataDictService {
|
||||
|
||||
CommonResult<List<DataDictBO>> selectDataDictList();
|
||||
|
||||
CommonResult<DataDictBO> addDataDict(Integer adminId, DataDictAddDTO dataDictAddDTO);
|
||||
|
||||
CommonResult<Boolean> updateDataDict(Integer adminId, DataDictUpdateDTO dataDictUpdateDTO);
|
||||
|
||||
CommonResult<Boolean> deleteDataDict(Integer adminId, Integer dataDictId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package cn.iocoder.mall.admin.api.bo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据字典 BO
|
||||
*/
|
||||
public class DataDictBO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 大类枚举值
|
||||
*/
|
||||
private String enumValue;
|
||||
/**
|
||||
* 小类数值
|
||||
*/
|
||||
private String value;
|
||||
/**
|
||||
* 展示名
|
||||
*/
|
||||
private String displayName;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DataDictBO setId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getEnumValue() {
|
||||
return enumValue;
|
||||
}
|
||||
|
||||
public DataDictBO setEnumValue(String enumValue) {
|
||||
this.enumValue = enumValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DataDictBO setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public DataDictBO setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public DataDictBO setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public DataDictBO setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public DataDictBO setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,6 +38,11 @@ public enum AdminErrorCodeEnum {
|
||||
// ========== 角色模块 1002004000 ==========
|
||||
ROLE_NOT_EXISTS(1002004000, "角色不存在"),
|
||||
ROLE_ASSIGN_RESOURCE_NOT_EXISTS(1002004001, "分配角色资源时,有资源不存在"),
|
||||
|
||||
// ========== 数据字典模块 1002005000 ==========
|
||||
DATA_DICT_EXISTS(1002005000, "该数据字典已经存在"),
|
||||
DATA_DICT_NOT_EXISTS(1002005001, "该数据字典已经存在"),
|
||||
|
||||
;
|
||||
|
||||
private final int code;
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package cn.iocoder.mall.admin.api.dto;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 数据字典添加 DTO
|
||||
*/
|
||||
public class DataDictAddDTO {
|
||||
|
||||
/**
|
||||
* 大类枚举值
|
||||
*/
|
||||
@NotEmpty(message = "大类枚举值不能为空")
|
||||
private String enumValue;
|
||||
/**
|
||||
* 小类数值
|
||||
*/
|
||||
@NotEmpty(message = "小类数值不能为空")
|
||||
private String value;
|
||||
/**
|
||||
* 展示名
|
||||
*/
|
||||
@NotEmpty(message = "展示名不能为空")
|
||||
private String displayName;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
@NotNull(message = "排序值不能为空")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
public String getEnumValue() {
|
||||
return enumValue;
|
||||
}
|
||||
|
||||
public DataDictAddDTO setEnumValue(String enumValue) {
|
||||
this.enumValue = enumValue;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DataDictAddDTO setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public DataDictAddDTO setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public DataDictAddDTO setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public DataDictAddDTO setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package cn.iocoder.mall.admin.api.dto;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 数据字典更新 DTO
|
||||
*/
|
||||
public class DataDictUpdateDTO {
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Integer id;
|
||||
/**
|
||||
* 小类数值
|
||||
*/
|
||||
@NotEmpty(message = "小类数值不能为空")
|
||||
private String value;
|
||||
/**
|
||||
* 展示名
|
||||
*/
|
||||
@NotEmpty(message = "展示名不能为空")
|
||||
private String displayName;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
@NotNull(message = "排序值不能为空")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public DataDictUpdateDTO setId(Integer id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public DataDictUpdateDTO setValue(String value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public DataDictUpdateDTO setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public DataDictUpdateDTO setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getMemo() {
|
||||
return memo;
|
||||
}
|
||||
|
||||
public DataDictUpdateDTO setMemo(String memo) {
|
||||
this.memo = memo;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user