refactor: 字典模块重构
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
package com.youlai.boot.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.youlai.boot.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 字典数据实体对象
|
||||
* 字典项实体对象
|
||||
*
|
||||
* @author haoxr
|
||||
* @author Ray.Hao
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_dict_data")
|
||||
@TableName("sys_dict_item")
|
||||
@Data
|
||||
public class DictData extends BaseEntity {
|
||||
public class DictItem extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 字典编码
|
||||
@@ -3,41 +3,36 @@ package com.youlai.boot.system.model.form;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典数据表单对象
|
||||
* 字典项表单对象
|
||||
*
|
||||
* @author Ray Hao
|
||||
* @since 2.9.0
|
||||
*/
|
||||
@Schema(description = "字典数据表单")
|
||||
@Schema(description = "字典项表单")
|
||||
@Data
|
||||
public class DictDataForm {
|
||||
public class DictItemForm {
|
||||
|
||||
@Schema(description = "字典ID")
|
||||
@Schema(description = "字典项ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典编码")
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "字典值")
|
||||
@Schema(description = "字典项值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典标签")
|
||||
@Schema(description = "字典项标签")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1-启用,0-禁用)")
|
||||
@Schema(description = "状态(0:禁用,1:启用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "字典类型")
|
||||
@Schema(description = "字典类型(用于显示样式)")
|
||||
private String tagType;
|
||||
|
||||
}
|
||||
@@ -8,10 +8,10 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description ="字典数据分页查询对象")
|
||||
public class DictDataPageQuery extends BasePageQuery {
|
||||
@Schema(description ="字典项分页查询对象")
|
||||
public class DictItemPageQuery extends BasePageQuery {
|
||||
|
||||
@Schema(description="关键字(字典数据标签/值)")
|
||||
@Schema(description="关键字(字典项值/字典项名称)")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description="字典编码")
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.youlai.boot.system.model.query;
|
||||
|
||||
|
||||
import com.youlai.boot.common.base.BasePageQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -8,13 +7,10 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description ="字典数据项分页查询对象")
|
||||
@Schema(description ="字典分页查询对象")
|
||||
public class DictPageQuery extends BasePageQuery {
|
||||
|
||||
@Schema(description="关键字(字典名称)")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description="字典编码")
|
||||
private String typeCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.youlai.boot.system.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 字典数据项
|
||||
*
|
||||
* @author Ray
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Schema(description = "字典数据项")
|
||||
@Getter
|
||||
@Setter
|
||||
public class DictItemOptionVO {
|
||||
|
||||
@Schema(description = "字典数据值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典数据标签")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "标签类型")
|
||||
private String tagType;
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import lombok.Setter;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据项分页VO
|
||||
* 字典项分页VO
|
||||
*
|
||||
* @author Ray
|
||||
* @since 0.0.1
|
||||
@@ -15,7 +15,7 @@ import lombok.Setter;
|
||||
@Schema(description = "字典数据分页对象")
|
||||
@Getter
|
||||
@Setter
|
||||
public class DictDataPageVO {
|
||||
public class DictItemPageVO {
|
||||
|
||||
@Schema(description = "字典数据ID")
|
||||
private Long id;
|
||||
Reference in New Issue
Block a user