wip: 字典重构临时提交
This commit is contained in:
@@ -17,17 +17,18 @@ import lombok.EqualsAndHashCode;
|
||||
public class Dict extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
* 字典编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 状态(0:正常;1:禁用)
|
||||
* 字典名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 状态(1:启用, 0:停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
@@ -6,17 +6,18 @@ 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;
|
||||
|
||||
/**
|
||||
* 字典项实体
|
||||
* 字典数据表
|
||||
*
|
||||
* @author haoxr
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@TableName("sys_dict_item")
|
||||
@TableName("sys_dict_data")
|
||||
@Data
|
||||
public class DictItem implements Serializable {
|
||||
public class DictData extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@@ -24,14 +25,14 @@ public class DictItem implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典类ID
|
||||
* 字典编码
|
||||
*/
|
||||
private Long dictId;
|
||||
private String dictCode;
|
||||
|
||||
/**
|
||||
* 字典项名称
|
||||
*/
|
||||
private String name;
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 字典项值
|
||||
@@ -0,0 +1,37 @@
|
||||
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 = "字典数据表单")
|
||||
@Data
|
||||
public class DictDataForm {
|
||||
|
||||
@Schema(description = "字典ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典标签")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1-启用,0-禁用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -23,39 +23,14 @@ public class DictForm {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称",example = "性别")
|
||||
private String name;
|
||||
private String dictName;
|
||||
|
||||
@Schema(description = "字典编码", example ="gender")
|
||||
private String code;
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "字典状态(1-启用,0-禁用)", example = "1")
|
||||
@Range(min = 0, max = 1, message = "字典状态不正确")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "字典数据项列表",example = "[{\"id\":1,\"name\":\"男\",\"value\":\"1\",\"sort\":1,\"status\":1},{\"id\":2,\"name\":\"女\",\"value\":\"2\",\"sort\":2,\"status\":1}]")
|
||||
private List<DictItem> dictItems;
|
||||
|
||||
@Schema(description = "字典数据项")
|
||||
@Getter
|
||||
@Setter
|
||||
public static class DictItem {
|
||||
|
||||
@Schema(description = "字典ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1-启用,0-禁用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description ="字典数据分页查询对象")
|
||||
public class DictDataPageQuery extends BasePageQuery {
|
||||
|
||||
@Schema(description="关键字(字典数据标签/值)")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description="字典编码")
|
||||
private String dictCode;
|
||||
|
||||
}
|
||||
@@ -11,9 +11,10 @@ import lombok.EqualsAndHashCode;
|
||||
@Schema(description ="字典数据项分页查询对象")
|
||||
public class DictPageQuery extends BasePageQuery {
|
||||
|
||||
@Schema(description="关键字(字典项名称)")
|
||||
@Schema(description="关键字(字典名称)")
|
||||
private String keywords;
|
||||
|
||||
@Schema(description="字典编码")
|
||||
private String typeCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.youlai.boot.system.model.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据项分页VO
|
||||
*
|
||||
* @author Ray
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Schema(description = "字典数据分页对象")
|
||||
@Getter
|
||||
@Setter
|
||||
public class DictDataPageVO {
|
||||
|
||||
@Schema(description = "字典数据ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典编码")
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "字典数据值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "字典数据标签")
|
||||
private String label;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1:启用,0:禁用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -23,37 +23,12 @@ public class DictPageVO {
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典名称")
|
||||
private String name;
|
||||
private String dictName;
|
||||
|
||||
@Schema(description = "字典编码")
|
||||
private String code;
|
||||
private String dictCode;
|
||||
|
||||
@Schema(description = "字典状态(1-启用,0-禁用)")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "字典项列表")
|
||||
private List<DictItem> dictItems;
|
||||
|
||||
@Schema(description = "字典")
|
||||
@Getter
|
||||
@Setter
|
||||
public static class DictItem {
|
||||
|
||||
@Schema(description = "字典项ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "字典项名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "字典项值")
|
||||
private String value;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "状态(1-启用,0-禁用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ public class UserNoticePageVO {
|
||||
@Schema(description = "通知标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "通知等级")
|
||||
private String level;
|
||||
|
||||
@Schema(description = "通知类型")
|
||||
private String typeLabel;
|
||||
|
||||
@@ -32,7 +35,7 @@ public class UserNoticePageVO {
|
||||
private String levelLabel;
|
||||
|
||||
@Schema(description = "发布时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
@Schema(description = "是否已读")
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.youlai.boot.system.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户公告VO
|
||||
*
|
||||
* @author Theo
|
||||
* @since 2024-08-28 16:56
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "用户公告VO")
|
||||
public class UserUnreadNoticeVO {
|
||||
|
||||
@Schema(description = "通知ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "通知标题")
|
||||
private String title;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user