feat(app): 新增工作台菜单权限过滤功能

- 在AppIndexServiceImpl中实现基于角色权限的菜单过滤
- 新增WORKBENCH页面类型枚举
- 为AppRole添加menuId字段存储权限菜单
- 扩展AppRoleService提供菜单查询接口
- 优化AppArticleCollectEntity增加image和visit字段
This commit is contained in:
PIG AI committed 2025-06-23 16:15:39 +08:00
1 parent 404d7bf6c2
commit 64cdd035e1
9 files changed
+385 -259

No files matched your search

@@ -22,65 +22,77 @@ import java.time.LocalDateTime;
@Schema(description = "文章收藏表")
public class AppArticleCollectEntity extends Model<AppArticleCollectEntity> {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Long id;
/**
* 用户ID
*/
@Schema(description = "用户ID")
private Long userId;
/**
* 用户ID
*/
@Schema(description = "用户ID")
private Long userId;
/**
* 文章ID
*/
@Schema(description = "文章ID")
private Long articleId;
/**
* 文章ID
*/
@Schema(description = "文章ID")
private Long articleId;
/**
* 文章标题
*/
@TableField(exist = false)
private String title;
/**
* 文章标题
*/
@TableField(exist = false)
private String title;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新人")
private String updateBy;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "更新时间")
private LocalDateTime updateTime;
/**
* 是否删除
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "是否删除")
private String delFlag;
/**
* 是否删除
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "是否删除")
private String delFlag;
/**
* 图片
*/
@TableField(exist = false)
private String image;
/**
* 访问次数
*/
@TableField(exist = false)
private Long visit;
}
@@ -6,6 +6,7 @@ import com.pig4cloud.pigx.common.core.util.TenantTable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.FieldNameConstants;
import java.time.LocalDateTime;
@@ -18,6 +19,7 @@ import java.time.LocalDateTime;
@Data
@TenantTable
@TableName("app_page")
@FieldNameConstants
@EqualsAndHashCode(callSuper = true)
@Schema(description = "页面")
public class AppPageEntity extends Model<AppPageEntity> {
@@ -63,11 +63,17 @@ public class AppRole extends Model<AppRole> {
private String roleCode;
/**
* roleDesc
* 角色描述
*/
@Schema(description = "roleDesc")
@Schema(description = "角色描述")
private String roleDesc;
/**
* 菜单ID列表
*/
@Schema(description = "菜单ID列表")
private String menuId;
/**
* 创建人
*/
@@ -18,7 +18,12 @@ public enum PageTypeEnums {
/**
* 客服设置
*/
SERVICE(3, "客服设置");
SERVICE(3, "客服设置"),
/**
* 工作台属性
*/
WORKBENCH(4, "工作台");
private final Integer pageType;