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.syslog.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.common.DictCode;
|
||||
import cn.lihongjie.coal.pojoProcessor.DictTranslate;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -10,6 +12,7 @@ import org.hibernate.annotations.Comment;
|
||||
public class SysLogDto extends OrgCommonDto {
|
||||
|
||||
private String optStatus;
|
||||
@DictTranslate(dictKey = DictCode.SYSLOG_STATUS)
|
||||
private String optStatusName;
|
||||
|
||||
@Comment("ip")
|
||||
|
||||
@@ -7,7 +7,6 @@ import jakarta.persistence.Entity;
|
||||
import lombok.Data;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.Formula;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@@ -41,14 +40,7 @@ public class SysLogEntity extends OrgBaseEntity {
|
||||
@Comment("操作状态 0 成功 1 失败")
|
||||
private String optStatus;
|
||||
|
||||
@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 = 'syslog.status'\n"
|
||||
+ " and i.code = opt_status)")
|
||||
private String optStatusName;
|
||||
|
||||
|
||||
@Comment("错误堆栈")
|
||||
private String stacktrace;
|
||||
|
||||
Reference in New Issue
Block a user