From a6fb88d74c20cc28043d75e8a5097fce49cf9a78 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期五, 15 十月 2021 15:19:42 +0800 Subject: [PATCH] update [重大更新]全业务 增加 接口文档注解 格式化代码 --- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java | 301 +++++++++++++++---------------------------------- 1 files changed, 95 insertions(+), 206 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 e4443ce..30d074b 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,231 +1,120 @@ package com.ruoyi.common.core.domain.entity; -import java.util.ArrayList; -import java.util.List; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.common.core.domain.TreeEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +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; /** * 鑿滃崟鏉冮檺琛� sys_menu - * - * @author ruoyi + * + * @author Lion Li */ -public class SysMenu extends BaseEntity -{ - private static final long serialVersionUID = 1L; - /** 鑿滃崟ID */ - private Long menuId; +@Data +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +@TableName("sys_menu") +@ApiModel("鑿滃崟鏉冮檺涓氬姟瀵硅薄") +public class SysMenu extends TreeEntity { - /** 鑿滃崟鍚嶇О */ - private String menuName; + /** + * 鑿滃崟ID + */ + @ApiModelProperty(value = "鑿滃崟ID") + @TableId(value = "menu_id") + private Long menuId; - /** 鐖惰彍鍗曞悕绉� */ - private String parentName; + /** + * 鑿滃崟鍚嶇О + */ + @ApiModelProperty(value = "鑿滃崟鍚嶇О") + @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖") + @Size(min = 0, max = 50, message = "鑿滃崟鍚嶇О闀垮害涓嶈兘瓒呰繃50涓瓧绗�") + private String menuName; - /** 鐖惰彍鍗旾D */ - private Long parentId; + /** + * 鏄剧ず椤哄簭 + */ + @ApiModelProperty(value = "鏄剧ず椤哄簭") + @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") + private String orderNum; - /** 鏄剧ず椤哄簭 */ - private String orderNum; + /** + * 璺敱鍦板潃 + */ + @ApiModelProperty(value = "璺敱鍦板潃") + @Size(min = 0, max = 200, message = "璺敱鍦板潃涓嶈兘瓒呰繃200涓瓧绗�") + private String path; - /** 璺敱鍦板潃 */ - private String path; + /** + * 缁勪欢璺緞 + */ + @ApiModelProperty(value = "缁勪欢璺緞") + @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃255涓瓧绗�") + private String component; - /** 缁勪欢璺緞 */ - private String component; + /** + * 璺敱鍙傛暟 + */ + @ApiModelProperty(value = "璺敱鍙傛暟") + private String query; - /** 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 */ - private String isFrame; + /** + * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 + */ + @ApiModelProperty(value = "鏄惁涓哄閾撅紙0鏄� 1鍚︼級") + private String isFrame; - /** 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� */ - private String menuType; + /** + * 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級 + */ + @ApiModelProperty(value = "鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級") + private String isCache; - /** 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� */ - private String visible; - - /** 鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛� */ - private String status; + /** + * 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� + */ + @ApiModelProperty(value = "绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�") + @NotBlank(message = "鑿滃崟绫诲瀷涓嶈兘涓虹┖") + private String menuType; - /** 鏉冮檺瀛楃涓� */ - private String perms; + /** + * 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� + */ + @ApiModelProperty(value = "鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�") + private String visible; - /** 鑿滃崟鍥炬爣 */ - private String icon; + /** + * 鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛� + */ + @ApiModelProperty(value = "鑿滃崟鐘舵�侊紙0鏄剧ず 1闅愯棌锛�") + private String status; - /** 瀛愯彍鍗� */ - private List<SysMenu> children = new ArrayList<SysMenu>(); + /** + * 鏉冮檺瀛楃涓� + */ + @ApiModelProperty(value = "鏉冮檺瀛楃涓�") + @Size(min = 0, max = 100, message = "鏉冮檺鏍囪瘑闀垮害涓嶈兘瓒呰繃100涓瓧绗�") + private String perms; - public Long getMenuId() - { - return menuId; - } + /** + * 鑿滃崟鍥炬爣 + */ + @ApiModelProperty(value = "鑿滃崟鍥炬爣") + private String icon; - public void setMenuId(Long menuId) - { - this.menuId = menuId; - } + /** + * 澶囨敞 + */ + @ApiModelProperty(value = "澶囨敞") + private String remark; - @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; - } - - @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("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