From a8d798c38a6e7fb186b6d8a20953af200caefc8c Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 22 七月 2022 17:34:14 +0800
Subject: [PATCH] fix 修复 RedisUtils 并发 set ttl 错误问题
---
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java | 159 +++++++++++++++++++----------------------------------
1 files changed, 57 insertions(+), 102 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..2fde8fc 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,78 @@
package com.ruoyi.system.domain;
-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.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
import com.ruoyi.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
/**
* 宀椾綅琛� sys_post
- *
- * @author ruoyi
+ *
+ * @author Lion Li
*/
-public class SysPost extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
- /** 宀椾綅搴忓彿 */
- @Excel(name = "宀椾綅搴忓彿", cellType = ColumnType.NUMERIC)
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_post")
+@ExcelIgnoreUnannotated
+public class SysPost extends BaseEntity {
+
+ /**
+ * 宀椾綅搴忓彿
+ */
+ @ExcelProperty(value = "宀椾綅搴忓彿")
+ @TableId(value = "post_id")
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 = "宀椾綅鎺掑簭")
+ @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
+ private Integer postSort;
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getPostSort()
- {
- return postSort;
- }
+ /**
+ * 鐘舵�侊紙0姝e父 1鍋滅敤锛�
+ */
+ @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(dictType = "sys_common_status")
+ private String status;
- public void setPostSort(String postSort)
- {
- this.postSort = postSort;
- }
+ /**
+ * 澶囨敞
+ */
+ private String remark;
- public String getStatus()
- {
- return status;
- }
+ /**
+ * 鐢ㄦ埛鏄惁瀛樺湪姝ゅ矖浣嶆爣璇� 榛樿涓嶅瓨鍦�
+ */
+ @TableField(exist = false)
+ private boolean flag = false;
- public void setStatus(String status)
- {
- this.status = status;
- }
-
- public boolean isFlag()
- {
- return flag;
- }
-
- 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();
- }
}
--
Gitblit v1.9.3