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,11 +1,12 @@
|
||||
package cn.lihongjie.coal.netDisk.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
public class NetDiskDto extends OrgCommonDto {
|
||||
@@ -15,13 +16,8 @@ public class NetDiskDto extends OrgCommonDto {
|
||||
@Comment("条目类型, 文件夹/目录")
|
||||
private String entryType;
|
||||
|
||||
@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 = 'netDisk.entryType'\n"
|
||||
+ " and i.code = entry_type)")
|
||||
|
||||
@DictTranslate(dictKey = DictCode.NETDISK_ENTRYTYPE)
|
||||
private String entryTypeName;
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -22,14 +21,7 @@ public class NetDiskEntity extends OrgCommonEntity {
|
||||
@Comment("条目类型, 文件夹/目录/分片文件")
|
||||
private String entryType;
|
||||
|
||||
@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 = 'netDisk.entryType'\n"
|
||||
+ " and i.code = entry_type)")
|
||||
private String entryTypeName;
|
||||
|
||||
|
||||
@OneToMany(
|
||||
mappedBy = "parent",
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package cn.lihongjie.coal.pdcDeviceSupplier.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -8,6 +10,7 @@ import lombok.Data;
|
||||
public class PdcDeviceSupplierDto extends OrgCommonDto {
|
||||
private String archiveStatus;
|
||||
|
||||
@DictTranslate(dictKey = DictCode.ARCHIVESTATUS)
|
||||
private String archiveStatusName;
|
||||
|
||||
private String contact;
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@@ -17,14 +16,7 @@ public class PdcDeviceSupplierEntity extends OrgCommonEntity {
|
||||
@ColumnDefault("'0'")
|
||||
private String archiveStatus = "0";
|
||||
|
||||
@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 = 'archiveStatus'\n"
|
||||
+ " and i.code = archive_status)")
|
||||
private String archiveStatusName;
|
||||
|
||||
|
||||
private String contact;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user