refactor: 公告类型适配字典数据

1.新增 <dict-tag> 自定义组件,用于回显字典标签
2.重构 useDict 方法,支持查询字典数据
3.优化部分字典相关数据类型
This commit is contained in:
2023-09-17 13:26:14 +08:00
parent d5c5bcfe7e
commit 3a3a5d6b71
30 changed files with 224 additions and 84 deletions

View File

@@ -23,6 +23,8 @@ import lombok.NoArgsConstructor;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* 键值对信息
*
@@ -49,8 +51,21 @@ public class LabelValueVO<V> implements Serializable {
@Schema(description = "", example = "1")
private V value;
/**
* 颜色
*/
@Schema(description = "颜色", example = "#165DFF")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String color;
public LabelValueVO(String label, V value) {
this.label = label;
this.value = value;
}
public LabelValueVO(String label, V value, String color) {
this.label = label;
this.value = value;
this.color = color;
}
}