菜单管理
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.cczsa.xinghe.codegen.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.cczsa.xinghe.codegen.entity.MenuBindFunEntity;
|
||||
|
||||
/**
|
||||
* 菜单绑定权限 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
public interface MenuBindFunMapper extends BaseMapper<MenuBindFunEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cczsa.xinghe.codegen.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.cczsa.xinghe.codegen.entity.MenuEntity;
|
||||
|
||||
/**
|
||||
* 菜单 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
public interface MenuMapper extends BaseMapper<MenuEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cczsa.xinghe.codegen.mapper.def;
|
||||
|
||||
import com.mybatisflex.core.query.QueryColumn;
|
||||
import com.mybatisflex.core.table.TableDef;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 菜单绑定权限 表定义层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class MenuBindFunDef extends TableDef {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 菜单绑定权限
|
||||
*/
|
||||
public static final MenuBindFunDef MENU_BIND_FUN_ENTITY = new MenuBindFunDef();
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
public final QueryColumn ID = new QueryColumn(this, "id");
|
||||
|
||||
/**
|
||||
* 功能ID
|
||||
*/
|
||||
public final QueryColumn FUN_ID = new QueryColumn(this, "fun_id");
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
public final QueryColumn MENU_ID = new QueryColumn(this, "menu_id");
|
||||
|
||||
/**
|
||||
* 所有字段。
|
||||
*/
|
||||
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
|
||||
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, MENU_ID, FUN_ID};
|
||||
|
||||
public MenuBindFunDef() {
|
||||
super("", "cg_menu_bind_fun");
|
||||
}
|
||||
|
||||
private MenuBindFunDef(String schema, String name, String alisa) {
|
||||
super(schema, name, alisa);
|
||||
}
|
||||
|
||||
public MenuBindFunDef as(String alias) {
|
||||
String key = getNameWithSchema() + "." + alias;
|
||||
return getCache(key, k -> new MenuBindFunDef("", "cg_menu_bind_fun", alias));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.cczsa.xinghe.codegen.mapper.def;
|
||||
|
||||
import com.mybatisflex.core.query.QueryColumn;
|
||||
import com.mybatisflex.core.table.TableDef;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 菜单 表定义层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
public class MenuDef extends TableDef {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 菜单
|
||||
*/
|
||||
public static final MenuDef MENU_ENTITY = new MenuDef();
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
public final QueryColumn ID = new QueryColumn(this, "id");
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
public final QueryColumn ICON = new QueryColumn(this, "icon");
|
||||
|
||||
/**
|
||||
* 路由路径
|
||||
*/
|
||||
public final QueryColumn PATH = new QueryColumn(this, "path");
|
||||
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
public final QueryColumn IS_HIDE = new QueryColumn(this, "is_hide");
|
||||
|
||||
/**
|
||||
* 是否租户
|
||||
*/
|
||||
public final QueryColumn IS_TENANT = new QueryColumn(this, "is_tenant");
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
public final QueryColumn MENU_NAME = new QueryColumn(this, "menu_name");
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
public final QueryColumn PARENT_ID = new QueryColumn(this, "parent_id");
|
||||
|
||||
|
||||
public final QueryColumn SORT_ORDER = new QueryColumn(this, "sort_order");
|
||||
|
||||
/**
|
||||
* 客户端类型:0 PC端,1 小程序端,2 H5端
|
||||
*/
|
||||
public final QueryColumn CLIENT_TYPE = new QueryColumn(this, "client_type");
|
||||
|
||||
/**
|
||||
* 所有字段。
|
||||
*/
|
||||
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
|
||||
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CLIENT_TYPE, MENU_NAME, PARENT_ID, PATH, ICON, IS_TENANT, IS_HIDE, SORT_ORDER};
|
||||
|
||||
public MenuDef() {
|
||||
super("", "cg_menu");
|
||||
}
|
||||
|
||||
private MenuDef(String schema, String name, String alisa) {
|
||||
super(schema, name, alisa);
|
||||
}
|
||||
|
||||
public MenuDef as(String alias) {
|
||||
String key = getNameWithSchema() + "." + alias;
|
||||
return getCache(key, k -> new MenuDef("", "cg_menu", alias));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user