feat: 添加获取所有字典和数据接口
This commit is contained in:
@@ -11,9 +11,9 @@ import lombok.EqualsAndHashCode;
|
||||
* @author haoxr
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_dict")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class Dict extends BaseEntity {
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,18 +3,18 @@ package com.youlai.boot.system.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.youlai.boot.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 字典数据表
|
||||
* 字典数据实体对象
|
||||
*
|
||||
* @author haoxr
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("sys_dict_data")
|
||||
@Data
|
||||
public class DictData extends BaseEntity {
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description ="字典数据分页查询对象")
|
||||
public class DictDataPageQuery extends BasePageQuery {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description ="字典数据项分页查询对象")
|
||||
public class DictPageQuery extends BasePageQuery {
|
||||
|
||||
|
||||
46
src/main/java/com/youlai/boot/system/model/vo/DictVO.java
Normal file
46
src/main/java/com/youlai/boot/system/model/vo/DictVO.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package com.youlai.boot.system.model.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据项分页VO
|
||||
*
|
||||
* @author Ray
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Schema(description = "字典数据分页对象")
|
||||
@Getter
|
||||
@Setter
|
||||
public class DictVO {
|
||||
|
||||
@Schema(description = "字典名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典编码")
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "字典数据集合")
|
||||
private List<DictData> dictDataList;
|
||||
|
||||
@Schema(description = "字典数据")
|
||||
@Getter
|
||||
@Setter
|
||||
public static class DictData {
|
||||
|
||||
@Schema(description = "字典数据值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典数据标签")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "标签类型")
|
||||
private String tagType;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user