feat: 菜单路由添加是否开启缓存和目录始终显示的设置

This commit is contained in:
hxr
2023-10-22 23:58:41 +08:00
parent c403c59107
commit a82ce8da7b
6 changed files with 180 additions and 116 deletions

View File

@@ -1,7 +1,5 @@
package com.youlai.system.model.bo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.youlai.system.common.enums.MenuTypeEnum;
import lombok.Data;
@@ -12,10 +10,7 @@ import java.util.List;
*/
@Data
public class RouteBO {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
@@ -73,4 +68,14 @@ public class RouteBO {
*/
private List<String> roles;
/**
* 【目录】只有一个子路由是否始终显示(1:是 0:否)
*/
private Integer alwaysShow;
/**
* 【菜单】是否开启页面缓存(1:是 0:否)
*/
private Integer keepAlive;
}

View File

@@ -78,4 +78,15 @@ public class SysMenu extends BaseEntity {
*/
private String treePath;
/**
* 【菜单】是否开启页面缓存(1:开启;0:关闭)
*/
private Integer keepAlive;
/**
* 【目录】只有一个子路由是否始终显示(1:是 0:否)
*/
private Integer alwaysShow;
}

View File

@@ -1,5 +1,6 @@
package com.youlai.system.model.form;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.youlai.system.common.enums.MenuTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -41,4 +42,11 @@ public class MenuForm {
@Schema(description = "跳转路径")
private String redirect;
@Schema(description = "【菜单】是否开启页面缓存", example = "1")
private Integer keepAlive;
@Schema(description = "【目录】只有一个子路由是否始终显示", example = "1")
private Integer alwaysShow;
}

View File

@@ -48,10 +48,12 @@ public class RouteVO {
@Schema(description = "拥有路由权限的角色编码", example = "['ADMIN','ROOT']")
private List<String> roles;
@Schema(description = "是否开启缓存", example = "true")
@Schema(description = "【菜单】是否开启页面缓存", example = "true")
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean keepAlive;
@Schema(description = "是否一直显示根路由", example = "true")
@Schema(description = "【目录】只有一个子路由是否始终显示", example = "true")
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean alwaysShow;
}