feat:小程序菜单管理

This commit is contained in:
dzc committed 2026-03-12 16:06:40 +08:00
1 parent 9644338a59
commit 7db5bfbee5
14 files changed
+603 -144

No files matched your search

@@ -0,0 +1,27 @@
package com.bsd.pjcloud.app.api.constant.menu;
import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* app菜单平台
*/
@AllArgsConstructor
@Getter
public enum AppMenuPlatformEnum {
WECHAT("10", "微信小程序"),
;
private final String type;
private final String description;
public static AppMenuPlatformEnum valueOfByType(String type) {
if (ObjectUtil.isEmpty(type)) return null;
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
}
}
@@ -0,0 +1,25 @@
package com.bsd.pjcloud.app.api.constant.menu;
import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* app菜单类型
*/
@AllArgsConstructor
@Getter
public enum AppMenuTypeEnum {
DASHBOARD_TAB("10", "菜单面板tab"),
;
private final String type;
private final String description;
public static AppMenuTypeEnum valueOfByType(String type) {
if (ObjectUtil.isEmpty(type)) return null;
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(type, v.getType())).findFirst().get();
}
}
@@ -0,0 +1,113 @@
package com.bsd.pjcloud.app.api.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
/**
* 菜单管理
*/
@Data
@TenantTable
@TableName("app_menu")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "菜单管理")
public class AppMenuEntity extends Model<AppMenuEntity> {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "id")
private Long id;
/**
* 平台(小程序、支付宝)
*/
@Schema(description = "平台(小程序、支付宝)")
private String platform;
/**
* 菜单类型
*/
@Schema(description = "菜单类型")
private String type;
/**
* 图标
*/
@Schema(description = "图标")
private String icon;
/**
* 页面路径(包含参数)
*/
@Schema(description = "页面路径(包含参数)")
private String page;
/**
* 页面标题
*/
@Schema(description = "页面标题")
private String title;
/**
* 是否显示
*/
@Schema(description = "是否显示")
private String visible;
/**
* 排序
*/
@Schema(description = "排序")
private Integer sort;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@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 LocalDateTime updateTime;
/**
* 删除标志
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标志")
private String delFlag;
/**
* 所属租户id
*/
@Schema(description = "所属租户id")
private Long tenantId;
}
@@ -56,6 +56,6 @@ public interface RemoteAppUserService {
* 同步admin账户信息为app账户
*/
@NoToken
@PostMapping("/appsocial/info/sync-admin-account-info")
@PostMapping("/appsocial/sync-admin-account-info")
R<AppUserInfo> syncAdminAccountInfo(@RequestBody AppAdminSyncDto appAdminSyncDto);
}