From d351c59b38f772fb4fcfcb1a16b3fe40098da4f7 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期日, 14 八月 2022 01:50:32 +0800
Subject: [PATCH] update 优化 缓存列表管理 适配 spring-cache 缓存的数据
---
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java | 349 +++++++++++++++++----------------------------------------
1 files changed, 104 insertions(+), 245 deletions(-)
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
index 7c35744..6e366a7 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
@@ -1,245 +1,104 @@
-package com.ruoyi.common.core.domain.entity;
-
-import java.util.ArrayList;
-import java.util.List;
-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.core.domain.BaseEntity;
-
-/**
- * 鑿滃崟鏉冮檺琛� sys_menu
- *
- * @author ruoyi
- */
-public class SysMenu extends BaseEntity
-{
- private static final long serialVersionUID = 1L;
-
- /** 鑿滃崟ID */
- private Long menuId;
-
- /** 鑿滃崟鍚嶇О */
- private String menuName;
-
- /** 鐖惰彍鍗曞悕绉� */
- private String parentName;
-
- /** 鐖惰彍鍗旾D */
- private Long parentId;
-
- /** 鏄剧ず椤哄簭 */
- private String orderNum;
-
- /** 璺敱鍦板潃 */
- private String path;
-
- /** 缁勪欢璺緞 */
- private String component;
-
- /** 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 */
- private String isFrame;
-
- /** 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級 */
- private String isCache;
-
- /** 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� */
- private String menuType;
-
- /** 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� */
- private String visible;
-
- /** 鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛� */
- private String status;
-
- /** 鏉冮檺瀛楃涓� */
- private String perms;
-
- /** 鑿滃崟鍥炬爣 */
- private String icon;
-
- /** 瀛愯彍鍗� */
- private List<SysMenu> children = new ArrayList<SysMenu>();
-
- public Long getMenuId()
- {
- return menuId;
- }
-
- public void setMenuId(Long menuId)
- {
- this.menuId = menuId;
- }
-
- @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖")
- @Size(min = 0, max = 50, message = "鑿滃崟鍚嶇О闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
- public String getMenuName()
- {
- return menuName;
- }
-
- public void setMenuName(String menuName)
- {
- this.menuName = menuName;
- }
-
- public String getParentName()
- {
- return parentName;
- }
-
- public void setParentName(String parentName)
- {
- this.parentName = parentName;
- }
-
- public Long getParentId()
- {
- return parentId;
- }
-
- public void setParentId(Long parentId)
- {
- this.parentId = parentId;
- }
-
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- public String getOrderNum()
- {
- return orderNum;
- }
-
- public void setOrderNum(String orderNum)
- {
- this.orderNum = orderNum;
- }
-
- @Size(min = 0, max = 200, message = "璺敱鍦板潃涓嶈兘瓒呰繃200涓瓧绗�")
- public String getPath()
- {
- return path;
- }
-
- public void setPath(String path)
- {
- this.path = path;
- }
-
- @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃255涓瓧绗�")
- public String getComponent()
- {
- return component;
- }
-
- public void setComponent(String component)
- {
- this.component = component;
- }
-
- public String getIsFrame()
- {
- return isFrame;
- }
-
- public void setIsFrame(String isFrame)
- {
- this.isFrame = isFrame;
- }
-
- public String getIsCache()
- {
- return isCache;
- }
-
- public void setIsCache(String isCache)
- {
- this.isCache = isCache;
- }
-
- @NotBlank(message = "鑿滃崟绫诲瀷涓嶈兘涓虹┖")
- public String getMenuType()
- {
- return menuType;
- }
-
- public void setMenuType(String menuType)
- {
- this.menuType = menuType;
- }
-
- public String getVisible()
- {
- return visible;
- }
-
- public void setVisible(String visible)
- {
- this.visible = visible;
- }
-
- public String getStatus()
- {
- return status;
- }
-
- public void setStatus(String status)
- {
- this.status = status;
- }
-
- @Size(min = 0, max = 100, message = "鏉冮檺鏍囪瘑闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- public String getPerms()
- {
- return perms;
- }
-
- public void setPerms(String perms)
- {
- this.perms = perms;
- }
-
- public String getIcon()
- {
- return icon;
- }
-
- public void setIcon(String icon)
- {
- this.icon = icon;
- }
-
- public List<SysMenu> getChildren()
- {
- return children;
- }
-
- public void setChildren(List<SysMenu> children)
- {
- this.children = children;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("menuId", getMenuId())
- .append("menuName", getMenuName())
- .append("parentId", getParentId())
- .append("orderNum", getOrderNum())
- .append("path", getPath())
- .append("component", getComponent())
- .append("isFrame", getIsFrame())
- .append("IsCache", getIsCache())
- .append("menuType", getMenuType())
- .append("visible", getVisible())
- .append("status ", getStatus())
- .append("perms", getPerms())
- .append("icon", getIcon())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .toString();
- }
-}
+package com.ruoyi.common.core.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.ruoyi.common.core.domain.TreeEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * 鑿滃崟鏉冮檺琛� sys_menu
+ *
+ * @author Lion Li
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_menu")
+public class SysMenu extends TreeEntity<SysMenu> {
+
+ /**
+ * 鑿滃崟ID
+ */
+ @TableId(value = "menu_id")
+ private Long menuId;
+
+ /**
+ * 鑿滃崟鍚嶇О
+ */
+ @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖")
+ @Size(min = 0, max = 50, message = "鑿滃崟鍚嶇О闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
+ private String menuName;
+
+ /**
+ * 鏄剧ず椤哄簭
+ */
+ @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
+ private Integer orderNum;
+
+ /**
+ * 璺敱鍦板潃
+ */
+ @Size(min = 0, max = 200, message = "璺敱鍦板潃涓嶈兘瓒呰繃200涓瓧绗�")
+ private String path;
+
+ /**
+ * 缁勪欢璺緞
+ */
+ @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃255涓瓧绗�")
+ private String component;
+
+ /**
+ * 璺敱鍙傛暟
+ */
+ private String queryParam;
+
+ /**
+ * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級
+ */
+ private String isFrame;
+
+ /**
+ * 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級
+ */
+ private String isCache;
+
+ /**
+ * 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�
+ */
+ @NotBlank(message = "鑿滃崟绫诲瀷涓嶈兘涓虹┖")
+ private String menuType;
+
+ /**
+ * 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�
+ */
+ private String visible;
+
+ /**
+ * 鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛�
+ */
+ private String status;
+
+ /**
+ * 鏉冮檺瀛楃涓�
+ */
+ @JsonInclude(JsonInclude.Include.NON_NULL)
+ @Size(min = 0, max = 100, message = "鏉冮檺鏍囪瘑闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ private String perms;
+
+ /**
+ * 鑿滃崟鍥炬爣
+ */
+ private String icon;
+
+ /**
+ * 澶囨敞
+ */
+ private String remark;
+
+}
--
Gitblit v1.9.3