From b71e8970fe5e4074b6b380d6e20b7926718dfded Mon Sep 17 00:00:00 2001
From: youjie <273666957@qq.com>
Date: 星期四, 26 八月 2021 11:59:05 +0800
Subject: [PATCH] update 优化生成的业务名
---
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java | 182 +++++++++++++++++++++------------------------
1 files changed, 85 insertions(+), 97 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
index 1f1fcf4..5672250 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
@@ -1,123 +1,111 @@
package com.ruoyi.system.domain;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.*;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.annotation.Excel.ColumnType;
-import com.ruoyi.common.core.domain.BaseEntity;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
/**
* 宀椾綅琛� sys_post
- *
+ *
* @author ruoyi
*/
-public class SysPost extends BaseEntity
-{
+
+@Data
+@NoArgsConstructor
+@Accessors(chain = true)
+@TableName("sys_post")
+@ExcelIgnoreUnannotated
+public class SysPost implements Serializable {
private static final long serialVersionUID = 1L;
- /** 宀椾綅搴忓彿 */
- @Excel(name = "宀椾綅搴忓彿", cellType = ColumnType.NUMERIC)
+ /**
+ * 宀椾綅搴忓彿
+ */
+ @ExcelProperty(value = "宀椾綅搴忓彿")
+ @TableId(value = "post_id", type = IdType.AUTO)
private Long postId;
- /** 宀椾綅缂栫爜 */
- @Excel(name = "宀椾綅缂栫爜")
- private String postCode;
-
- /** 宀椾綅鍚嶇О */
- @Excel(name = "宀椾綅鍚嶇О")
- private String postName;
-
- /** 宀椾綅鎺掑簭 */
- @Excel(name = "宀椾綅鎺掑簭")
- private String postSort;
-
- /** 鐘舵�侊紙0姝e父 1鍋滅敤锛� */
- @Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
- private String status;
-
- /** 鐢ㄦ埛鏄惁瀛樺湪姝ゅ矖浣嶆爣璇� 榛樿涓嶅瓨鍦� */
- private boolean flag = false;
-
- public Long getPostId()
- {
- return postId;
- }
-
- public void setPostId(Long postId)
- {
- this.postId = postId;
- }
-
+ /**
+ * 宀椾綅缂栫爜
+ */
+ @ExcelProperty(value = "宀椾綅缂栫爜")
@NotBlank(message = "宀椾綅缂栫爜涓嶈兘涓虹┖")
@Size(min = 0, max = 64, message = "宀椾綅缂栫爜闀垮害涓嶈兘瓒呰繃64涓瓧绗�")
- public String getPostCode()
- {
- return postCode;
- }
+ private String postCode;
- public void setPostCode(String postCode)
- {
- this.postCode = postCode;
- }
-
+ /**
+ * 宀椾綅鍚嶇О
+ */
+ @ExcelProperty(value = "宀椾綅鍚嶇О")
@NotBlank(message = "宀椾綅鍚嶇О涓嶈兘涓虹┖")
@Size(min = 0, max = 50, message = "宀椾綅鍚嶇О闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
- public String getPostName()
- {
- return postName;
- }
+ private String postName;
- public void setPostName(String postName)
- {
- this.postName = postName;
- }
-
+ /**
+ * 宀椾綅鎺掑簭
+ */
+ @ExcelProperty(value = "宀椾綅鎺掑簭")
@NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getPostSort()
- {
- return postSort;
- }
+ private String postSort;
- public void setPostSort(String postSort)
- {
- this.postSort = postSort;
- }
+ /**
+ * 鐘舵�侊紙0姝e父 1鍋滅敤锛�
+ */
+ @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(dictType = "sys_common_status")
+ private String status;
- public String getStatus()
- {
- return status;
- }
+ /**
+ * 鍒涘缓鑰�
+ */
+ @TableField(fill = FieldFill.INSERT)
+ private String createBy;
- public void setStatus(String status)
- {
- this.status = status;
- }
+ /**
+ * 鍒涘缓鏃堕棿
+ */
+ @TableField(fill = FieldFill.INSERT)
+ private Date createTime;
- public boolean isFlag()
- {
- return flag;
- }
+ /**
+ * 鏇存柊鑰�
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private String updateBy;
- public void setFlag(boolean flag)
- {
- this.flag = flag;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("postId", getPostId())
- .append("postCode", getPostCode())
- .append("postName", getPostName())
- .append("postSort", getPostSort())
- .append("status", getStatus())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
+ /**
+ * 鏇存柊鏃堕棿
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private Date updateTime;
+
+ /**
+ * 澶囨敞
+ */
+ private String remark;
+
+ /**
+ * 璇锋眰鍙傛暟
+ */
+ @TableField(exist = false)
+ private Map<String, Object> params = new HashMap<>();
+
+ /**
+ * 鐢ㄦ埛鏄惁瀛樺湪姝ゅ矖浣嶆爣璇� 榛樿涓嶅瓨鍦�
+ */
+ @TableField(exist = false)
+ private boolean flag = false;
+
}
--
Gitblit v1.9.3