mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 20:57:14 +08:00
feat: 新增查询列映射信息列表接口
提取 QueryTypeEnum 枚举
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package top.charles7c.cnadmin.webapi.controller.tool;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -25,12 +26,14 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import top.charles7c.cnadmin.common.model.query.PageQuery;
|
||||
import top.charles7c.cnadmin.common.model.vo.PageDataVO;
|
||||
import top.charles7c.cnadmin.common.model.vo.R;
|
||||
import top.charles7c.cnadmin.tool.model.entity.ColumnMappingDO;
|
||||
import top.charles7c.cnadmin.tool.model.query.TableQuery;
|
||||
import top.charles7c.cnadmin.tool.model.vo.TableVO;
|
||||
import top.charles7c.cnadmin.tool.service.GeneratorService;
|
||||
@@ -55,4 +58,10 @@ public class GeneratorController {
|
||||
public R<PageDataVO<TableVO>> pageTable(TableQuery query, @Validated PageQuery pageQuery) throws SQLException {
|
||||
return R.ok(generatorService.pageTable(query, pageQuery));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询列映射信息列表", description = "查询列映射信息列表")
|
||||
@GetMapping("/column/{tableName}")
|
||||
public R<List<ColumnMappingDO>> listColumnMapping(@PathVariable String tableName) {
|
||||
return R.ok(generatorService.listColumnMapping(tableName));
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ logging:
|
||||
enabled: true
|
||||
# 是否记录内网 IP 操作
|
||||
includeInnerIp: true
|
||||
# 哪些请求方式不记录系统日志
|
||||
# 排除请求方式
|
||||
#excludeMethods:
|
||||
# - GET
|
||||
# 脱敏字段
|
||||
@@ -45,6 +45,15 @@ logging:
|
||||
- password
|
||||
- Authorization
|
||||
|
||||
--- ### 代码生成器配置
|
||||
generator:
|
||||
# 排除数据表
|
||||
excludeTables:
|
||||
- DATABASECHANGELOG
|
||||
- DATABASECHANGELOGLOCK
|
||||
- gen_config
|
||||
- gen_column_mapping
|
||||
|
||||
--- ### 接口文档配置
|
||||
springdoc:
|
||||
# 设置对象型参数的展示形式(设为 true 表示将对象型参数平展开,即对象内的属性直接作为参数展示而不是嵌套在对象内,默认为 false)
|
||||
|
@@ -1,2 +1,40 @@
|
||||
-- liquibase formatted sql
|
||||
|
||||
-- changeset Charles7c:1
|
||||
CREATE TABLE IF NOT EXISTS `gen_config` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(100) NOT NULL COMMENT '表名称',
|
||||
`module_name` varchar(50) NOT NULL COMMENT '模块名称',
|
||||
`package_name` varchar(50) NOT NULL COMMENT '包名称',
|
||||
`frontend_path` varchar(255) NOT NULL COMMENT '前端路径',
|
||||
`business_name` varchar(50) NOT NULL COMMENT '业务名称',
|
||||
`author` varchar(100) NOT NULL COMMENT '作者',
|
||||
`table_prefix` varchar(20) DEFAULT NULL COMMENT '表前缀',
|
||||
`is_override` bit(1) DEFAULT b'0' COMMENT '是否覆盖',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `uk_table_name`(`table_name`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='生成配置表';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `gen_column_mapping` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(100) NOT NULL COMMENT '表名称',
|
||||
`column_name` varchar(50) NOT NULL COMMENT '列名称',
|
||||
`column_type` varchar(25) NOT NULL COMMENT '列类型',
|
||||
`field_name` varchar(50) NOT NULL COMMENT '字段名称',
|
||||
`field_type` varchar(25) NOT NULL COMMENT '字段类型',
|
||||
`comment` varchar(512) DEFAULT NULL COMMENT '注释',
|
||||
`sort` int(11) UNSIGNED DEFAULT 999 COMMENT '排序',
|
||||
`is_required` bit(1) DEFAULT b'1' COMMENT '是否必填',
|
||||
`show_in_list` bit(1) DEFAULT b'1' COMMENT '是否在列表中显示',
|
||||
`show_in_add` bit(1) DEFAULT b'1' COMMENT '是否在新增中显示',
|
||||
`show_in_update` bit(1) DEFAULT b'1' COMMENT '是否在修改中显示',
|
||||
`show_in_query` bit(1) DEFAULT b'1' COMMENT '是否在查询中显示',
|
||||
`form_type` tinyint(1) UNSIGNED DEFAULT NULL COMMENT '表单类型',
|
||||
`query_type` tinyint(1) UNSIGNED DEFAULT NULL COMMENT '查询方式',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
`update_time` datetime NOT NULL COMMENT '修改时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_table_name`(`table_name`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='列映射表';
|
Reference in New Issue
Block a user