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,6 +1,8 @@
|
||||
package cn.lihongjie.coal.loginUserHis.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.CommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
import cn.lihongjie.coal.user.dto.UserDto;
|
||||
|
||||
import jakarta.persistence.ManyToOne;
|
||||
@@ -8,7 +10,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -27,13 +28,8 @@ public class LoginUserHisDto extends CommonDto {
|
||||
private String status;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.status'\n"
|
||||
+ " and i.code = status)")
|
||||
|
||||
@DictTranslate(dictKey = DictCode.LOGINUSERHIS_LOGINSTATUS)
|
||||
private String statusName;
|
||||
|
||||
@Comment("session id")
|
||||
@@ -48,13 +44,6 @@ public class LoginUserHisDto extends CommonDto {
|
||||
@Comment("登出类型")
|
||||
private String logoutType;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.logoutType'\n"
|
||||
+ " and i.code = logout_type)")
|
||||
@DictTranslate(dictKey = DictCode.LOGINUSERHIS_LOGOUTTYPE)
|
||||
private String logoutTypeName;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import jakarta.persistence.ManyToOne;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -36,14 +35,7 @@ public class LoginUserHisEntity extends CommonEntity {
|
||||
private String loginStatus;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.loginStatus'\n"
|
||||
+ " and i.code = login_status)")
|
||||
private String loginStatusName;
|
||||
|
||||
|
||||
@Comment("session id")
|
||||
private String sessionId;
|
||||
@@ -58,14 +50,7 @@ public class LoginUserHisEntity extends CommonEntity {
|
||||
private String logoutType;
|
||||
|
||||
|
||||
@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 = 'loginUserHis.logoutType'\n"
|
||||
+ " and i.code = logout_type)")
|
||||
private String logoutTypeName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package cn.lihongjie.coal.thirdAccount.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;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -14,13 +15,9 @@ public class ThirdAccountDto extends OrgCommonDto {
|
||||
@Comment("账号类型")
|
||||
private String accountType;
|
||||
|
||||
@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 = 'thirdAccount.type'\n"
|
||||
+ " and i.code = account_type)")
|
||||
|
||||
|
||||
@DictTranslate(dictKey = DictCode.THIRDACCOUNT_TYPE)
|
||||
private String accountTypeName;
|
||||
|
||||
@Comment("用户名")
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -18,14 +17,7 @@ public class ThirdAccountEntity extends OrgCommonEntity {
|
||||
@Comment("账号类型")
|
||||
private String accountType;
|
||||
|
||||
@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 = 'thirdAccount.type'\n"
|
||||
+ " and i.code = account_type)")
|
||||
private String accountTypeName;
|
||||
|
||||
|
||||
@Comment("用户名")
|
||||
private String username;
|
||||
|
||||
Reference in New Issue
Block a user