mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
优化
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cn.lihongjie.coal.resource.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,6 +14,7 @@ public class ResourceDto extends CommonDto {
|
||||
@Comment("资源类型")
|
||||
private String type;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.RESOURCE_TYPE)
|
||||
private String typeName;
|
||||
|
||||
@Comment("资源地址")
|
||||
|
||||
@@ -12,7 +12,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -42,14 +41,7 @@ public class ResourceEntity extends CommonEntity {
|
||||
@Comment("资源类型 0 菜单 1 按钮 3 url")
|
||||
private String type;
|
||||
|
||||
@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 = 'resource.type'\n"
|
||||
+ " and i.code = type)")
|
||||
private String typeName;
|
||||
|
||||
|
||||
@Comment("资源地址")
|
||||
private String url;
|
||||
|
||||
Reference in New Issue
Block a user