✨ Introducing new features. 动态菜单增加带参组件字段
This commit is contained in:
1 parent
12cc50109c
commit
d2585f2890
3 files changed
+98
-88
No files matched your search
+95
-88
@@ -28,6 +28,7 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -44,109 +45,115 @@ import java.time.LocalDateTime;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SysMenu extends Model<SysMenu> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@TableId(value = "menu_id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "菜单id")
|
||||
private Long menuId;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@TableId(value = "menu_id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "菜单id")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
@Schema(description = "菜单名称")
|
||||
private String name;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@NotBlank(message = "菜单名称不能为空")
|
||||
@Schema(description = "菜单名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 菜单权限标识
|
||||
*/
|
||||
@Schema(description = "菜单权限标识")
|
||||
private String permission;
|
||||
/**
|
||||
* 菜单权限标识
|
||||
*/
|
||||
@Schema(description = "菜单权限标识")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@NotNull(message = "菜单父ID不能为空")
|
||||
@Schema(description = "菜单父id")
|
||||
private Long parentId;
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@NotNull(message = "菜单父ID不能为空")
|
||||
@Schema(description = "菜单父id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
@Schema(description = "菜单图标")
|
||||
private String icon;
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
@Schema(description = "菜单图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 前端路由标识路径,默认和 comment 保持一致 过期
|
||||
*/
|
||||
@Schema(description = "前端路由标识路径")
|
||||
private String path;
|
||||
/**
|
||||
* 前端路由标识路径,默认和 comment 保持一致 过期
|
||||
*/
|
||||
@Schema(description = "前端路由标识路径")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 菜单显示隐藏控制
|
||||
*/
|
||||
@Schema(description = "菜单是否显示")
|
||||
private String visible;
|
||||
/**
|
||||
* 前端组件
|
||||
*/
|
||||
@Schema(description = "前端组件")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
@Schema(description = "排序值")
|
||||
private Integer sortOrder;
|
||||
/**
|
||||
* 菜单显示隐藏控制
|
||||
*/
|
||||
@Schema(description = "菜单是否显示")
|
||||
private String visible;
|
||||
|
||||
/**
|
||||
* 菜单类型 (0菜单 1按钮)
|
||||
*/
|
||||
@NotNull(message = "菜单类型不能为空")
|
||||
@Schema(description = "菜单类型,0:菜单 1:按钮")
|
||||
private String menuType;
|
||||
/**
|
||||
* 排序值
|
||||
*/
|
||||
@Schema(description = "排序值")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 路由缓冲
|
||||
*/
|
||||
@Schema(description = "路由缓冲")
|
||||
private String keepAlive;
|
||||
/**
|
||||
* 菜单类型 (0菜单 1按钮)
|
||||
*/
|
||||
@NotNull(message = "菜单类型不能为空")
|
||||
@Schema(description = "菜单类型,0:菜单 1:按钮")
|
||||
private String menuType;
|
||||
|
||||
@Schema(description = "菜单是否内嵌")
|
||||
private String embedded;
|
||||
/**
|
||||
* 路由缓冲
|
||||
*/
|
||||
@Schema(description = "路由缓冲")
|
||||
private String keepAlive;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
@Schema(description = "菜单是否内嵌")
|
||||
private String embedded;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
@Schema(description = "修改人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
@Schema(description = "修改人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 0--正常 1--删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "删除标记,1:已删除,0:正常")
|
||||
private String delFlag;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 0--正常 1--删除
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description = "删除标记,1:已删除,0:正常")
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
+1
@@ -160,6 +160,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
// 扩展属性
|
||||
Map<String, Object> extra = new HashMap<>();
|
||||
extra.put("path", menu.getPath());
|
||||
extra.put("componentPath", menu.getComponent());
|
||||
extra.put("menuType", menu.getMenuType());
|
||||
extra.put("permission", menu.getPermission());
|
||||
extra.put("sortOrder", menu.getSortOrder());
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<result column="name" property="name"/>
|
||||
<result column="permission" property="permission"/>
|
||||
<result column="path" property="path"/>
|
||||
<result column="component" property="component"/>
|
||||
<result column="parent_id" property="parentId"/>
|
||||
<result column="icon" property="icon"/>
|
||||
<result column="sort_order" property="sortOrder"/>
|
||||
@@ -45,6 +46,7 @@
|
||||
sys_menu.name,
|
||||
sys_menu.permission,
|
||||
sys_menu.path,
|
||||
sys_menu.component,
|
||||
sys_menu.parent_id,
|
||||
sys_menu.icon,
|
||||
sys_menu.sort_order,
|
||||
|
||||
Reference in new issue
Block a user