From 4500db395fdad42c7689e17ef6e3965a6caebdcc Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 12 四月 2021 17:02:55 +0800 Subject: [PATCH] update ruoyi原生改为 MP lombok 格式 update SysConfig 模块代码 --- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java | 231 +++++++++++---------------------------------------------- 1 files changed, 45 insertions(+), 186 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 94d654a..17e706d 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,26 +1,36 @@ package com.ruoyi.common.core.domain.entity; -import java.util.ArrayList; -import java.util.List; +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +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.core.domain.BaseEntity; +import java.util.*; /** * 鑿滃崟鏉冮檺琛� sys_menu * * @author ruoyi */ -public class SysMenu extends BaseEntity + +@Data +@NoArgsConstructor +@Accessors(chain = true) +@TableName("sys_menu") +public class SysMenu { private static final long serialVersionUID = 1L; /** 鑿滃崟ID */ + @TableId(value = "menu_id",type = IdType.AUTO) private Long menuId; /** 鑿滃崟鍚嶇О */ + @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖") + @Size(min = 0, max = 50, message = "鑿滃崟鍚嶇О闀垮害涓嶈兘瓒呰繃50涓瓧绗�") private String menuName; /** 鐖惰彍鍗曞悕绉� */ @@ -30,12 +40,15 @@ private Long parentId; /** 鏄剧ず椤哄簭 */ + @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") private String orderNum; /** 璺敱鍦板潃 */ + @Size(min = 0, max = 200, message = "璺敱鍦板潃涓嶈兘瓒呰繃200涓瓧绗�") private String path; /** 缁勪欢璺緞 */ + @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃255涓瓧绗�") private String component; /** 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 */ @@ -45,6 +58,7 @@ private String isCache; /** 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� */ + @NotBlank(message = "鑿滃崟绫诲瀷涓嶈兘涓虹┖") private String menuType; /** 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� */ @@ -54,192 +68,37 @@ private String status; /** 鏉冮檺瀛楃涓� */ + @Size(min = 0, max = 100, message = "鏉冮檺鏍囪瘑闀垮害涓嶈兘瓒呰繃100涓瓧绗�") private String perms; /** 鑿滃崟鍥炬爣 */ private String icon; + /** 鍒涘缓鑰� */ + private String createBy; + + /** 鍒涘缓鏃堕棿 */ + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** 鏇存柊鑰� */ + private String updateBy; + + /** 鏇存柊鏃堕棿 */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** 澶囨敞 */ + private String remark; + + /** 璇锋眰鍙傛暟 */ + @TableField(exist = false) + private Map<String, Object> params = new HashMap<>(); + /** 瀛愯彍鍗� */ + @TableField(exist = false) 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(); - } } -- Gitblit v1.9.3