POST/infra/codegen/addCodegenTable管理后台

代码生成表定义-新增

平台与系统 / 代码生成·表· CodegenTableController#addCodegenTable

基本信息

  • 接口状态脚手架生成·未接入前端 置信度 中
  • 接口URLPOSThttps://dscp-dev.hn12301.net/manage-api/infra/codegen/addCodegenTable
  • 请求方式POST
  • Content-Typeapplication/json
  • 暴露渠道管理后台 前缀 /manage-api
  • 名称来源源码注释
  • 调用方本次扫描未发现调用 不等于可以下线
  • 需求上下文feat:新增代码生成服务
  • 维护人 / 最后改动AsiQue 2023-11-27 最近提交:feat:新增代码生成服务
  • 读写数据表infra_codegen_table 反查该表全部接口 →
  • 控制器com.jxxx.dscp.api.controller.infra.CodegenTableController#addCodegenTable
  • 源码位置jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/infra/CodegenTableController.java:73
  • 判定依据控制器由代码生成器产出(@author Chaos-Toolkits),整套 CRUD 接口但前端无调用

请求参数

Header 请求参数

参数名参数值是否必填参数类型描述说明
无(渠道统一鉴权头见《认证方式》)

Query 请求参数

参数名参数值是否必填参数类型描述说明
无

路径参数及说明

参数名参数值是否必填参数类型描述说明
无

Body 请求参数

Body 类型 CodegenTableAddRequest
参数名参数值是否必填参数类型描述说明
dataSourceConfigId…是Long数据源配置的编号 → infra_codegen_table.data_source_config_id
scene…是Integer生成场景 → infra_codegen_table.scene
tableName…是String表名称 → infra_codegen_table.table_name
tableComment…是String表描述 → infra_codegen_table.table_comment
remark…否String备注 → infra_codegen_table.remark
moduleName…是String模块名 → infra_codegen_table.module_name
businessName…是String业务名 → infra_codegen_table.business_name
className…是String类名称 → infra_codegen_table.class_name
classComment…是String类描述 → infra_codegen_table.class_comment
author…是String作者 → infra_codegen_table.author
templateType…是Integer模板类型 → infra_codegen_table.template_type
frontType…是Integer前端类型 → infra_codegen_table.front_type
parentMenuId…否Long父菜单编号 → infra_codegen_table.parent_menu_id
masterTableId…否Long主表的编号 → infra_codegen_table.master_table_id
subJoinColumnId…否Long子表关联主表的字段编号 → infra_codegen_table.sub_join_column_id
subJoinMany…否Boolean主表与子表是否一对多 → infra_codegen_table.sub_join_many
treeParentColumnId…否Long树表的父字段编号 → infra_codegen_table.tree_parent_column_id
treeNameColumnId…否Long树表的名字字段编号 → infra_codegen_table.tree_name_column_id

认证方式

需登录态:Authorization: Bearer <token>(多租户另带 tenant-id);30002 会话失效需重登。详见全局公共参数。

响应参数

data 类型 CodegenTableResponse
参数名参数值是否必填参数类型描述说明
id…否Long编号 → infra_codegen_table.id
dataSourceConfigId…否Long数据源配置的编号 → infra_codegen_table.data_source_config_id
scene…否Integer生成场景 → infra_codegen_table.scene
tableName…否String表名称 → infra_codegen_table.table_name
tableComment…否String表描述 → infra_codegen_table.table_comment
remark…否String备注 → infra_codegen_table.remark
moduleName…否String模块名 → infra_codegen_table.module_name
businessName…否String业务名 → infra_codegen_table.business_name
className…否String类名称 → infra_codegen_table.class_name
classComment…否String类描述 → infra_codegen_table.class_comment
author…否String作者 → infra_codegen_table.author
templateType…否Integer模板类型 → infra_codegen_table.template_type
frontType…否Integer前端类型 → infra_codegen_table.front_type
parentMenuId…否Long父菜单编号 → infra_codegen_table.parent_menu_id
masterTableId…否Long主表的编号 → infra_codegen_table.master_table_id
subJoinColumnId…否Long子表关联主表的字段编号 → infra_codegen_table.sub_join_column_id
subJoinMany…否Boolean主表与子表是否一对多 → infra_codegen_table.sub_join_many
treeParentColumnId…否Long树表的父字段编号 → infra_codegen_table.tree_parent_column_id
treeNameColumnId…否Long树表的名字字段编号 → infra_codegen_table.tree_name_column_id

响应示例

成功响应示例 code=0

{
  "errcode": 0,
  "errmsg": "",
  "data": {
    "id": "1",
    "dataSourceConfigId": "1",
    "scene": "1",
    "tableName": "\"string\"",
    "tableComment": "\"string\"",
    "remark": "\"string\"",
    "moduleName": "\"string\"",
    "businessName": "\"string\"",
    "className": "\"string\"",
    "classComment": "\"string\"",
    "author": "\"string\"",
    "templateType": "1"
  }
}
示例来自源码/导出内容,仅结构参考,非线上真实数据。

附录 · 实现细节

调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:infra_codegen_table 反查全部引用接口 →
  • CodegenTableController#addCodegenTable
  • BeanUtils.map → CodegenTable ⇒ 表 infra_codegen_table
逻辑摘要:新增(infraService.add);入参与返回值经 BeanUtils 做对象/分页映射
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)
由 tools/build.py 从 data/apis.json 生成 · 生成时间 2026-09-12 19:49 · 数据口径见说明 · 本页数字非手写,均来自同一份数据