refactor: 字典模块重构

This commit is contained in:
Ray.Hao
2025-03-24 07:24:32 +08:00
parent b080d11853
commit 60f94fdf7f
24 changed files with 264 additions and 277 deletions

View File

@@ -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 {
/**
* 字典编码

View File

@@ -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;
}

View File

@@ -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="字典编码")

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;