mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
优化
This commit is contained in:
@@ -1,16 +1,24 @@
|
||||
package cn.lihongjie.coal.dictionary.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
import cn.lihongjie.coal.script.entity.ScriptEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DictionaryDto extends CommonDto {
|
||||
|
||||
private String dictType;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.DICT_TYPE)
|
||||
private String dictTypeName;
|
||||
|
||||
private String componentType;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.DICT_COMPONENTTYPE)
|
||||
private String componentTypeName;
|
||||
|
||||
private ScriptEntity script;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import lombok.Setter;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -30,26 +29,12 @@ public class DictionaryEntity extends CommonEntity {
|
||||
@Comment("字典类型 1 静态字典 2 动态字典")
|
||||
private String dictType;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'dict.type'\n"
|
||||
+ " and i.code = dict_type)")
|
||||
private String dictTypeName;
|
||||
|
||||
|
||||
@Comment("字典类型 1 枚举 2 树")
|
||||
private String componentType;
|
||||
|
||||
@Formula(
|
||||
"(select i.name\n"
|
||||
+ "from t_dictionary d,\n"
|
||||
+ " t_dictionary_item i\n"
|
||||
+ "where d.id = i.dictionary_id\n"
|
||||
+ " and d.code = 'dict.componentType'\n"
|
||||
+ " and i.code = component_type)")
|
||||
private String componentTypeName;
|
||||
|
||||
|
||||
@OneToOne
|
||||
@Comment("动态字典关联的脚本")
|
||||
|
||||
Reference in New Issue
Block a user