功能管理
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.FunItemEntity;
|
||||
|
||||
/**
|
||||
* 功能 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
public interface FunItemMapper extends BaseMapper<FunItemEntity> {
|
||||
|
||||
}
|
||||
@@ -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.FunModuleEntity;
|
||||
|
||||
/**
|
||||
* 模块 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
public interface FunModuleMapper extends BaseMapper<FunModuleEntity> {
|
||||
|
||||
}
|
||||
@@ -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.FunOperationEntity;
|
||||
|
||||
/**
|
||||
* 操作 映射层。
|
||||
*
|
||||
* @author My
|
||||
* @since 0.0.1
|
||||
*/
|
||||
@Mapper
|
||||
public interface FunOperationMapper extends BaseMapper<FunOperationEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
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 FunItemDef extends TableDef {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 功能
|
||||
*/
|
||||
public static final FunItemDef FUN_ITEM_ENTITY = new FunItemDef();
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
public final QueryColumn ID = new QueryColumn(this, "id");
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
public final QueryColumn DESCRIBE = new QueryColumn(this, "describe");
|
||||
|
||||
/**
|
||||
* 是否租户
|
||||
*/
|
||||
public final QueryColumn IS_TENANT = new QueryColumn(this, "is_tenant");
|
||||
|
||||
/**
|
||||
* 功能编码
|
||||
*/
|
||||
public final QueryColumn ITEM_CODE = new QueryColumn(this, "item_code");
|
||||
|
||||
/**
|
||||
* 功能名称
|
||||
*/
|
||||
public final QueryColumn ITEM_NAME = new QueryColumn(this, "item_name");
|
||||
|
||||
/**
|
||||
* 模块ID
|
||||
*/
|
||||
public final QueryColumn MODULE_ID = new QueryColumn(this, "module_id");
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
public final QueryColumn SORT_ORDER = new QueryColumn(this, "sort_order");
|
||||
|
||||
/**
|
||||
* 所有字段。
|
||||
*/
|
||||
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
|
||||
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, MODULE_ID, ITEM_NAME, ITEM_CODE, IS_TENANT, DESCRIBE, SORT_ORDER};
|
||||
|
||||
public FunItemDef() {
|
||||
super("", "cg_fun_item");
|
||||
}
|
||||
|
||||
private FunItemDef(String schema, String name, String alisa) {
|
||||
super(schema, name, alisa);
|
||||
}
|
||||
|
||||
public FunItemDef as(String alias) {
|
||||
String key = getNameWithSchema() + "." + alias;
|
||||
return getCache(key, k -> new FunItemDef("", "cg_fun_item", alias));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
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 FunModuleDef extends TableDef {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 模块
|
||||
*/
|
||||
public static final FunModuleDef FUN_MODULE_ENTITY = new FunModuleDef();
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
public final QueryColumn ID = new QueryColumn(this, "id");
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
public final QueryColumn DESCRIBE = new QueryColumn(this, "describe");
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
public final QueryColumn SORT_ORDER = new QueryColumn(this, "sort_order");
|
||||
|
||||
/**
|
||||
* 模块编码
|
||||
*/
|
||||
public final QueryColumn MODULE_CODE = new QueryColumn(this, "module_code");
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
public final QueryColumn MODULE_NAME = new QueryColumn(this, "module_name");
|
||||
|
||||
/**
|
||||
* 包名称
|
||||
*/
|
||||
public final QueryColumn PACKAGE_NAME = new QueryColumn(this, "package_name");
|
||||
|
||||
/**
|
||||
* 参数包名
|
||||
*/
|
||||
public final QueryColumn API_PACKAGE_NAME = new QueryColumn(this, "api_package_name");
|
||||
|
||||
/**
|
||||
* 所有字段。
|
||||
*/
|
||||
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
|
||||
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, MODULE_NAME, MODULE_CODE, DESCRIBE, PACKAGE_NAME, API_PACKAGE_NAME, SORT_ORDER};
|
||||
|
||||
public FunModuleDef() {
|
||||
super("", "cg_fun_module");
|
||||
}
|
||||
|
||||
private FunModuleDef(String schema, String name, String alisa) {
|
||||
super(schema, name, alisa);
|
||||
}
|
||||
|
||||
public FunModuleDef as(String alias) {
|
||||
String key = getNameWithSchema() + "." + alias;
|
||||
return getCache(key, k -> new FunModuleDef("", "cg_fun_module", alias));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
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 FunOperationDef extends TableDef {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 操作
|
||||
*/
|
||||
public static final FunOperationDef FUN_OPERATION_ENTITY = new FunOperationDef();
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
public final QueryColumn ID = new QueryColumn(this, "id");
|
||||
|
||||
/**
|
||||
* 功能ID
|
||||
*/
|
||||
public final QueryColumn ITEM_ID = new QueryColumn(this, "item_id");
|
||||
|
||||
/**
|
||||
* 操作名称
|
||||
*/
|
||||
public final QueryColumn FUN_NAME = new QueryColumn(this, "fun_name");
|
||||
|
||||
/**
|
||||
* 操作类型>>查>>改>>删>>增
|
||||
*/
|
||||
public final QueryColumn FUN_TYPE = new QueryColumn(this, "fun_type");
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
public final QueryColumn DESCRIBE = new QueryColumn(this, "describe");
|
||||
|
||||
/**
|
||||
* 模块ID
|
||||
*/
|
||||
public final QueryColumn MODULE_ID = new QueryColumn(this, "module_id");
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
public final QueryColumn SORT_ORDER = new QueryColumn(this, "sort_order");
|
||||
|
||||
/**
|
||||
* 可配置字段
|
||||
*/
|
||||
public final QueryColumn FIELD_COFNIG = new QueryColumn(this, "field_cofnig");
|
||||
|
||||
/**
|
||||
* 请求类型
|
||||
*/
|
||||
public final QueryColumn REQUEST_TYPE = new QueryColumn(this, "request_type");
|
||||
|
||||
/**
|
||||
* 直接放行
|
||||
*/
|
||||
public final QueryColumn IS_GREEN_LIGHT = new QueryColumn(this, "is_green_light");
|
||||
|
||||
/**
|
||||
* 可配置数据类型json[]
|
||||
*/
|
||||
public final QueryColumn USABLE_CONFIG = new QueryColumn(this, "usable_config");
|
||||
|
||||
/**
|
||||
* 操作编码
|
||||
*/
|
||||
public final QueryColumn OPERATION_CODE = new QueryColumn(this, "operation_code");
|
||||
|
||||
/**
|
||||
* 所有字段。
|
||||
*/
|
||||
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
|
||||
|
||||
/**
|
||||
* 默认字段,不包含逻辑删除或者 large 等字段。
|
||||
*/
|
||||
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, MODULE_ID, ITEM_ID, IS_GREEN_LIGHT, FUN_NAME, OPERATION_CODE, FUN_TYPE, REQUEST_TYPE, USABLE_CONFIG, FIELD_COFNIG, SORT_ORDER, DESCRIBE};
|
||||
|
||||
public FunOperationDef() {
|
||||
super("", "cg_fun_operation");
|
||||
}
|
||||
|
||||
private FunOperationDef(String schema, String name, String alisa) {
|
||||
super(schema, name, alisa);
|
||||
}
|
||||
|
||||
public FunOperationDef as(String alias) {
|
||||
String key = getNameWithSchema() + "." + alias;
|
||||
return getCache(key, k -> new FunOperationDef("", "cg_fun_operation", alias));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user