POST
/infra/codegen/addCodegenColumn管理后台代码生成表字段定义-新增
平台与系统 / 代码生成·字段
基本信息
- 接口状态脚手架生成·未接入前端
- 接口URLPOST
https://dscp-dev.hn12301.net/manage-api/infra/codegen/addCodegenColumn - 请求方式
POST - Content-Type
application/json - 暴露渠道管理后台 前缀
/manage-api - 名称来源源码注释
- 调用方本次扫描未发现调用
- 需求上下文
- 维护人 / 最后改动AsiQue 2023-11-27
- 读写数据表
infra_codegen_column反查该表全部接口 → - 控制器
com.jxxx.dscp.api.controller.infra.CodegenColumnController#addCodegenColumn - 源码位置
jxxx-dscp/dscp-service-business/src/main/java/com/jxxx/dscp/api/controller/infra/CodegenColumnController.java:73 - 判定依据
请求参数
Header 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无(渠道统一鉴权头见《认证方式》) | ||||
Query 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
路径参数及说明
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| 无 | ||||
Body 请求参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| tableId | … | 是 | Long | 表编号 → infra_codegen_column.table_id |
| columnName | … | 是 | String | 字段名 → infra_codegen_column.column_name |
| dataType | … | 是 | String | 字段类型 → infra_codegen_column.data_type |
| columnComment | … | 是 | String | 字段描述 → infra_codegen_column.column_comment |
| nullable | … | 是 | Boolean | 是否允许为空 → infra_codegen_column.nullable |
| primaryKey | … | 是 | Boolean | 是否主键 → infra_codegen_column.primary_key |
| autoIncrement | … | 是 | String | 是否自增 → infra_codegen_column.auto_increment |
| ordinalPosition | … | 是 | Integer | 排序 → infra_codegen_column.ordinal_position |
| javaType | … | 是 | String | Java 属性类型 → infra_codegen_column.java_type |
| javaField | … | 是 | String | Java 属性名 → infra_codegen_column.java_field |
| dictType | … | 否 | String | 字典类型 → infra_codegen_column.dict_type |
| example | … | 否 | String | 数据示例 → infra_codegen_column.example |
| createOperation | … | 是 | Boolean | 是否为 Create 创建操作的字段 → infra_codegen_column.create_operation |
| updateOperation | … | 是 | Boolean | 是否为 Update 更新操作的字段 → infra_codegen_column.update_operation |
| listOperation | … | 是 | Boolean | 是否为 List 查询操作的字段 → infra_codegen_column.list_operation |
| listOperationCondition | … | 是 | String | List 查询操作的条件类型 → infra_codegen_column.list_operation_condition |
| listOperationResult | … | 是 | Boolean | 是否为 List 查询操作的返回字段 → infra_codegen_column.list_operation_result |
| htmlType | … | 是 | String | 显示类型 → infra_codegen_column.html_type |
认证方式
响应参数
| 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 |
|---|---|---|---|---|
| id | … | 否 | Long | 编号 → infra_codegen_column.id |
| tableId | … | 否 | Long | 表编号 → infra_codegen_column.table_id |
| columnName | … | 否 | String | 字段名 → infra_codegen_column.column_name |
| dataType | … | 否 | String | 字段类型 → infra_codegen_column.data_type |
| columnComment | … | 否 | String | 字段描述 → infra_codegen_column.column_comment |
| nullable | … | 否 | Boolean | 是否允许为空 → infra_codegen_column.nullable |
| primaryKey | … | 否 | Boolean | 是否主键 → infra_codegen_column.primary_key |
| autoIncrement | … | 否 | String | 是否自增 → infra_codegen_column.auto_increment |
| ordinalPosition | … | 否 | Integer | 排序 → infra_codegen_column.ordinal_position |
| javaType | … | 否 | String | Java 属性类型 → infra_codegen_column.java_type |
| javaField | … | 否 | String | Java 属性名 → infra_codegen_column.java_field |
| dictType | … | 否 | String | 字典类型 → infra_codegen_column.dict_type |
| example | … | 否 | String | 数据示例 → infra_codegen_column.example |
| createOperation | … | 否 | Boolean | 是否为 Create 创建操作的字段 → infra_codegen_column.create_operation |
| updateOperation | … | 否 | Boolean | 是否为 Update 更新操作的字段 → infra_codegen_column.update_operation |
| listOperation | … | 否 | Boolean | 是否为 List 查询操作的字段 → infra_codegen_column.list_operation |
| listOperationCondition | … | 否 | String | List 查询操作的条件类型 → infra_codegen_column.list_operation_condition |
| listOperationResult | … | 否 | Boolean | 是否为 List 查询操作的返回字段 → infra_codegen_column.list_operation_result |
| htmlType | … | 否 | String | 显示类型 → infra_codegen_column.html_type |
响应示例
成功响应示例
{
"errcode": 0,
"errmsg": "",
"data": {
"id": "1",
"tableId": "1",
"columnName": "\"string\"",
"dataType": "\"string\"",
"columnComment": "\"string\"",
"nullable": "false",
"primaryKey": "false",
"autoIncrement": "\"string\"",
"ordinalPosition": "1",
"javaType": "\"string\"",
"javaField": "\"string\"",
"dictType": "\"string\""
}
}附录 · 实现细节
调用链 / 数据表 / 调用点证据 / 源码注释 / 逻辑摘要
涉及数据表:infra_codegen_column 反查全部引用接口 →
- CodegenColumnController#addCodegenColumn
- BeanUtils.map → CodegenColumn ⇒ 表 infra_codegen_column
逻辑摘要:新增(infraService.add);入参与返回值经 BeanUtils 做对象/分页映射
旧站环境备注:pro:(仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意)