API数据表更新

This commit is contained in:
2025-08-26 21:12:04 +08:00
parent 2a8aa14e47
commit 98672e9c0f
14 changed files with 404 additions and 27 deletions

View File

@@ -0,0 +1,18 @@
package com.mini.capi.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 接口文档主表 前端控制器
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@RestController
@RequestMapping("/biz/apiDoc")
public class ApiDocController {
}

View File

@@ -0,0 +1,18 @@
package com.mini.capi.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 接口字段参数表 前端控制器
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@RestController
@RequestMapping("/biz/apiParam")
public class ApiParamController {
}

View File

@@ -0,0 +1,92 @@
package com.mini.capi.biz.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 接口文档主表
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@Getter
@Setter
@TableName("biz_api_doc")
public class ApiDoc implements Serializable {
private static final long serialVersionUID = 1L;
@TableField("create_time")
private LocalDateTime createTime;
/**
* 接口主键
*/
@TableId(value = "api_id", type = IdType.AUTO)
private String apiId;
/**
* 接口名称
*/
@TableField("cname")
private String cname;
/**
* HTTP 方法GET/POST/PUT/DELETE/PATCH/HEAD/OPTIONS
*/
@TableField("method_name")
private String methodName;
/**
* 请求路径
*/
@TableField("cpath")
private String cpath;
/**
* 详细描述
*/
@TableField("description")
private String description;
/**
* 默认请求/返回 Content-Type
*/
@TableField("content_type")
private String contentType;
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 租户id
*/
@TableField("f_tenant_id")
private String fTenantId;
/**
* 流程id
*/
@TableField("f_flow_id")
private String fFlowId;
/**
* 流程任务主键
*/
@TableField("f_flow_task_id")
private String fFlowTaskId;
/**
* 流程任务状态
*/
@TableField("f_flow_state")
private Integer fFlowState;
}

View File

@@ -0,0 +1,98 @@
package com.mini.capi.biz.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
* 接口字段参数表
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@Getter
@Setter
@TableName("biz_api_param")
public class ApiParam implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "api_param_id", type = IdType.AUTO)
private String apiParamId;
/**
* 对应接口级说明id
*/
@TableField("api_id")
private String apiId;
/**
* 参数类型,1请求0返回
*/
@TableField("param_type")
private String paramType;
/**
* 字段名
*/
@TableField("cname")
private String cname;
/**
* 数据类型 string/int/array/object...
*/
@TableField("data_type")
private String dataType;
/**
* 是否必填
*/
@TableField("is_required")
private String isRequired;
/**
* 默认值
*/
@TableField("default_value")
private String defaultValue;
/**
* 字段说明
*/
@TableField("description")
private String description;
/**
* 枚举值
*/
@TableField("enum_values")
private String enumValues;
/**
* 示例值
*/
@TableField("example")
private String example;
/**
* 排序
*/
@TableField("sort_order")
private Integer sortOrder;
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 租户id
*/
@TableField("f_tenant_id")
private String fTenantId;
}

View File

@@ -15,7 +15,7 @@ import lombok.Setter;
* </p>
*
* @author gaoxq
* @since 2025-08-25
* @since 2025-08-26
*/
@Getter
@Setter
@@ -33,18 +33,6 @@ public class Municipalities implements Serializable {
@TableField("create_time")
private LocalDateTime createTime;
/**
* 省份名称
*/
@TableField("province_name")
private String provinceName;
/**
* 市区名称
*/
@TableField("city_name")
private String cityName;
/**
* 县区名称
*/
@@ -55,7 +43,7 @@ public class Municipalities implements Serializable {
* 省份编码
*/
@TableField("province_code")
private Long provinceCode;
private String provinceCode;
/**
* 市区编码
@@ -69,18 +57,6 @@ public class Municipalities implements Serializable {
@TableField("county_code")
private String countyCode;
/**
* 市县级别
*/
@TableField("city_type")
private Integer cityType;
/**
* 市区区号
*/
@TableField("area_code")
private String areaCode;
/**
* 街道名称
*/
@@ -122,4 +98,22 @@ public class Municipalities implements Serializable {
*/
@TableField("f_tenant_id")
private String fTenantId;
/**
* 流程id
*/
@TableField("f_flow_id")
private String fFlowId;
/**
* 流程任务主键
*/
@TableField("f_flow_task_id")
private String fFlowTaskId;
/**
* 流程任务状态
*/
@TableField("f_flow_state")
private Integer fFlowState;
}

View File

@@ -0,0 +1,16 @@
package com.mini.capi.biz.mapper;
import com.mini.capi.biz.domain.ApiDoc;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 接口文档主表 Mapper 接口
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
public interface ApiDocMapper extends BaseMapper<ApiDoc> {
}

View File

@@ -0,0 +1,16 @@
package com.mini.capi.biz.mapper;
import com.mini.capi.biz.domain.ApiParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 接口字段参数表 Mapper 接口
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
public interface ApiParamMapper extends BaseMapper<ApiParam> {
}

View File

@@ -0,0 +1,16 @@
package com.mini.capi.biz.service;
import com.mini.capi.biz.domain.ApiDoc;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 接口文档主表 服务类
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
public interface ApiDocService extends IService<ApiDoc> {
}

View File

@@ -0,0 +1,16 @@
package com.mini.capi.biz.service;
import com.mini.capi.biz.domain.ApiParam;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 接口字段参数表 服务类
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
public interface ApiParamService extends IService<ApiParam> {
}

View File

@@ -0,0 +1,20 @@
package com.mini.capi.biz.service.impl;
import com.mini.capi.biz.domain.ApiDoc;
import com.mini.capi.biz.mapper.ApiDocMapper;
import com.mini.capi.biz.service.ApiDocService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 接口文档主表 服务实现类
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@Service
public class ApiDocServiceImpl extends ServiceImpl<ApiDocMapper, ApiDoc> implements ApiDocService {
}

View File

@@ -0,0 +1,20 @@
package com.mini.capi.biz.service.impl;
import com.mini.capi.biz.domain.ApiParam;
import com.mini.capi.biz.mapper.ApiParamMapper;
import com.mini.capi.biz.service.ApiParamService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 接口字段参数表 服务实现类
* </p>
*
* @author gaoxq
* @since 2025-08-26
*/
@Service
public class ApiParamServiceImpl extends ServiceImpl<ApiParamMapper, ApiParam> implements ApiParamService {
}

View File

@@ -29,7 +29,7 @@ public class demo {
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
})
.strategyConfig(builder -> {
builder.addInclude("")
builder.addInclude("biz_municipalities,biz_api_doc,biz_api_param")
.addTablePrefix("biz_")
.entityBuilder()
.enableLombok()

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mini.capi.biz.mapper.ApiDocMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.mini.capi.biz.domain.ApiDoc">
<id column="api_id" property="apiId" />
<result column="create_time" property="createTime" />
<result column="cname" property="cname" />
<result column="method_name" property="methodName" />
<result column="cpath" property="cpath" />
<result column="description" property="description" />
<result column="content_type" property="contentType" />
<result column="update_time" property="updateTime" />
<result column="f_tenant_id" property="fTenantId" />
<result column="f_flow_id" property="fFlowId" />
<result column="f_flow_task_id" property="fFlowTaskId" />
<result column="f_flow_state" property="fFlowState" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_time, api_id, cname, method_name, cpath, description, content_type, update_time, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state
</sql>
</mapper>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mini.capi.biz.mapper.ApiParamMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.mini.capi.biz.domain.ApiParam">
<id column="api_param_id" property="apiParamId" />
<result column="api_id" property="apiId" />
<result column="param_type" property="paramType" />
<result column="cname" property="cname" />
<result column="data_type" property="dataType" />
<result column="is_required" property="isRequired" />
<result column="default_value" property="defaultValue" />
<result column="description" property="description" />
<result column="enum_values" property="enumValues" />
<result column="example" property="example" />
<result column="sort_order" property="sortOrder" />
<result column="update_time" property="updateTime" />
<result column="f_tenant_id" property="fTenantId" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
api_param_id, api_id, param_type, cname, data_type, is_required, default_value, description, enum_values, example, sort_order, update_time, f_tenant_id
</sql>
</mapper>