Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
appbuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
appbuild
Commits
424bb789
Commit
424bb789
authored
May 12, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改驼峰命名法
parent
60794258
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3166 additions
and
0 deletions
+3166
-0
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/service/impl/GentableServiceImpl.java
...ase/system/gentable/service/impl/GentableServiceImpl.java
+1
-0
appbuild-manager/src/main/resources/template/doc/apipost-8.ftl
...ild-manager/src/main/resources/template/doc/apipost-8.ftl
+3165
-0
No files found.
appbuild-manager/src/main/java/com/mortals/xhx/base/system/gentable/service/impl/GentableServiceImpl.java
View file @
424bb789
...
@@ -275,6 +275,7 @@ public class GentableServiceImpl extends AbstractCRUDServiceImpl<GentableDao, Ge
...
@@ -275,6 +275,7 @@ public class GentableServiceImpl extends AbstractCRUDServiceImpl<GentableDao, Ge
zipTemplate
(
"api.md.ftl"
,
"doc/api.md"
,
data
,
zip
);
zipTemplate
(
"api.md.ftl"
,
"doc/api.md"
,
data
,
zip
);
FreeMarkerUtils
.
initFreeMarker
(
genFreePath
(
"apipost.md.ftl"
));
FreeMarkerUtils
.
initFreeMarker
(
genFreePath
(
"apipost.md.ftl"
));
zipTemplate
(
"apipost.ftl"
,
String
.
format
(
"doc/%s.json"
,
gentableEntity
.
getName
()),
data
,
zip
);
zipTemplate
(
"apipost.ftl"
,
String
.
format
(
"doc/%s.json"
,
gentableEntity
.
getName
()),
data
,
zip
);
zipTemplate
(
"apipost-8.ftl"
,
String
.
format
(
"doc/%s-8.json"
,
gentableEntity
.
getName
()),
data
,
zip
);
IOUtils
.
closeQuietly
(
zip
);
IOUtils
.
closeQuietly
(
zip
);
return
outputStream
.
toByteArray
();
return
outputStream
.
toByteArray
();
...
...
appbuild-manager/src/main/resources/template/doc/apipost-8.ftl
0 → 100644
View file @
424bb789
{
"name": "${appInfo.name}",
"intro": "1",
"global": {
"envs": [
{
"env_id": "1",
"name": "默认环境",
"is_private": -1,
"sort": 0,
"server_list": [
{
"server_id": "1",
"name": "默认服务",
"sort": 0,
"uri": ""
}
],
"env_var_list": {}
},
{
"env_id": "2",
"name": "Mock环境",
"is_private": -1,
"sort": 0,
"server_list": [
{
"server_id": "1",
"name": "默认服务",
"sort": 1000,
"uri": "https://mock.apipost.net/mock/464af977dc90000a"
}
],
"env_var_list": {}
}
],
"servers": [
{
"server_id": "1",
"name": "默认服务",
"sort": 1000
}
],
"global_vars": {},
"global_param": {
"header": {
"parameter": []
},
"query": {
"parameter": []
},
"body": {
"parameter": []
},
"cookie": {
"parameter": []
},
"pre_tasks": [],
"post_tasks": []
},
"codes": [],
"marks": [
{
"mark_id": "1",
"project_id": "0",
"name": "开发中",
"color": "#2857FF",
"is_sys_default": 1,
"is_default_mark": 1
},
{
"mark_id": "2",
"project_id": "0",
"name": "已完成",
"color": "#26CEA4",
"is_sys_default": 1,
"is_default_mark": -1
},
{
"mark_id": "3",
"project_id": "0",
"name": "需修改",
"color": "#FFC01E",
"is_sys_default": 1,
"is_default_mark": -1
},
{
"mark_id": "4",
"project_id": "0",
"name": "已废弃",
"color": "#FF2200",
"is_sys_default": 1,
"is_default_mark": -1
}
],
"attributes": [],
"mock_custom_rules": [],
"db_link": [],
"describe_library": []
},
"models": [],
"apis": [
{
"target_id": "24b21d697fe5d3",
"parent_id": "0",
"target_type": "folder",
"name": "系统服务",
"version": 4,
"sort": 7000,
"server_id": "0",
"description": "",
"request": {
"auth": {
"type": "noauth",
"kv": {
"key": "",
"value": "",
"in": "header"
},
"bearer": {
"key": ""
},
"basic": {
"username": "",
"password": ""
},
"digest": {
"username": "",
"password": "",
"realm": "",
"nonce": "",
"algorithm": "",
"qop": "",
"nc": "",
"cnonce": "",
"opaque": ""
},
"hawk": {
"authId": "",
"authKey": "",
"algorithm": "",
"user": "",
"nonce": "",
"extraData": "",
"default": "",
"delegation": "",
"timestamp": "",
"includePayloadHash": false
},
"awsv4": {
"accessKey": "",
"secretKey": "",
"region": "",
"service": "",
"sessionToken": "",
"addAuthDataToQuery": false
},
"ntlm": {
"username": "",
"password": "",
"entity": "",
"workstation": "",
"disableRetryRequest": false
},
"edgegrid": {
"accessToken": "",
"clientToken": "",
"clientSecret": "",
"nonce": "",
"timestamp": "",
"baseURi": "",
"headersToSign": ""
},
"oauth1": {
"consumerKey": "",
"consumerSecret": "",
"signatureMethod": "HMAC-SHA1",
"addEmptyParamsToSign": true,
"includeBodyHash": true,
"addParamsToHeader": false,
"disableHeaderEncoding": false,
"realm": "",
"version": "1.0",
"nonce": "",
"timestamp": "",
"verifier": "",
"callback": "",
"tokenSecret": "",
"token": ""
},
"jwt": {
"addTokenTo": "header",
"algorithm": "HS256",
"secret": "",
"isSecretBase64Encoded": false,
"payload": "",
"headerPrefix": "Bearer",
"queryParamKey": "token",
"header": ""
},
"asap": {
"alg": "HS256",
"iss": "",
"aud": "",
"kid": "",
"privateKey": "",
"sub": "",
"claims": "",
"exp": ""
}
},
"pre_tasks": [],
"post_tasks": [],
"body": {
"parameter": []
},
"header": {
"parameter": []
},
"query": {
"parameter": []
},
"cookie": {
"parameter": []
}
}
},
{
"target_id": "24b21d697fe5d7",
"parent_id": "24b21d697fe5d3",
"target_type": "api",
"name": "用户登录",
"version": 4,
"sort": 2000,
"method": "POST",
"url": "{{baseUrl}}/login/login",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
"body": {
"mode": "json",
"parameter": [
{
"param_id": "45199129f0e6000",
"description": "用户名",
"field_type": "string",
"is_checked": 1,
"key": "loginName",
"not_null": 1,
"value": "admin",
"schema": {
"type": "string"
}
},
{
"param_id": "45199129f0e6001",
"description": "密码",
"field_type": "string",
"is_checked": 1,
"key": "password",
"not_null": 1,
"value": "admin",
"schema": {
"type": "string"
}
},
{
"param_id": "45199129f0e6002",
"description": "验证码",
"field_type": "string",
"is_checked": 1,
"key": "securityCode",
"not_null": 1,
"value": "123456",
"schema": {
"type": "string"
}
}
],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object",
"required": [
"loginName",
"password",
"securityCode"
],
"properties": {
"password": {
"type": "string",
"description": "密码",
"x-schema-mock": "@string( @word, 8, 16 )"
},
"loginName": {
"type": "string",
"description": "用户名",
"x-schema-mock": "@word()"
},
"securityCode": {
"type": "string",
"description": "校验码",
"x-schema-mock": "@string( @word, 4, 4 )"
}
},
"description": "",
"x-schema-orders": [
"loginName",
"password",
"securityCode"
]
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "{\n\t\"msg\": \"成功\",\n\t\"code\": 6882800553454135,\n\t\"data\": {\n\t\t\"user\": {\n\t\t\t\"admin\": false,\n\t\t\t\"areaCodes\": \"511500000000,511500000001\",\n\t\t\t\"areaNames\": \"宜宾市,北京市\",\n\t\t\t\"expireTime\": 48,\n\t\t\t\"id\": 5,\n\t\t\t\"loginName\": \"Betty\",\n\t\t\t\"mobile\": \"028-81382114\",\n\t\t\t\"realName\": \"陆秀兰\",\n\t\t\t\"siteIds\": \"1,2\",\n\t\t\t\"userType\": 1\n\t\t},\n\t\t\"token\": \"D54941Ab-4b6F-7D07-Bf6d-fc1abD93D0e2\"\n\t}\n}",
"raw_parameter": [
{
"param_id": "4519912a74e6000",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6001",
"description": "",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "成功",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6002",
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "6882800553454135",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6003",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6004",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data.user",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6005",
"description": "是否为管理员",
"field_type": "boolean",
"is_checked": 1,
"key": "data.user.admin",
"not_null": 1,
"value": "false",
"schema": {
"type": "boolean"
}
},
{
"param_id": "4519912a74e6006",
"description": "所属区域编码",
"field_type": "string",
"is_checked": 1,
"key": "data.user.areaCodes",
"not_null": 1,
"value": "511500000000,511500000001",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6007",
"description": "所属区域名称",
"field_type": "string",
"is_checked": 1,
"key": "data.user.areaNames",
"not_null": 1,
"value": "宜宾市,北京市",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6008",
"description": "token过期时间",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.expireTime",
"not_null": 1,
"value": "48",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6009",
"description": "用户id",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.id",
"not_null": 1,
"value": "5",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e600a",
"description": "登录名",
"field_type": "string",
"is_checked": 1,
"key": "data.user.loginName",
"not_null": 1,
"value": "Betty",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e600b",
"description": "电话",
"field_type": "string",
"is_checked": 1,
"key": "data.user.mobile",
"not_null": 1,
"value": "028-81382114",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e600c",
"description": "用户真实名称",
"field_type": "string",
"is_checked": 1,
"key": "data.user.realName",
"not_null": 1,
"value": "陆秀兰",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e600d",
"description": "用户所属站点ids",
"field_type": "string",
"is_checked": 1,
"key": "data.user.siteIds",
"not_null": 1,
"value": "1,2",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e600e",
"description": "用户类型",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.userType",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e600f",
"description": "用户token",
"field_type": "string",
"is_checked": 1,
"key": "data.token",
"not_null": 1,
"value": "D54941Ab-4b6F-7D07-Bf6d-fc1abD93D0e2",
"schema": {
"type": "string"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [],
"properties": {
"msg": {
"type": "string"
},
"code": {
"type": "integer"
},
"data": {
"type": "object",
"required": [],
"properties": {
"user": {
"type": "object",
"required": [],
"properties": {
"id": {
"type": "integer",
"description": "用户id",
"x-schema-mock": "@integer(1,100)"
},
"admin": {
"type": "boolean",
"description": "是否为管理员",
"x-schema-mock": "false"
},
"mobile": {
"type": "string",
"description": "电话",
"x-schema-mock": "028-81382114"
},
"siteIds": {
"type": "string",
"description": "用户所属站点ids",
"x-schema-mock": "1,2"
},
"realName": {
"type": "string",
"description": "用户真实名称",
"x-schema-mock": "@cname()"
},
"userType": {
"type": "integer",
"description": "用户类型",
"x-schema-mock": "1"
},
"areaCodes": {
"type": "string",
"description": "所属区域编码",
"x-schema-mock": "511500000000,511500000001"
},
"areaNames": {
"type": "string",
"description": "所属区域名称",
"x-schema-mock": "宜宾市,北京市"
},
"loginName": {
"type": "string",
"description": "登录名",
"x-schema-mock": "@first()"
},
"expireTime": {
"type": "integer",
"description": "token过期时间",
"x-schema-mock": "@integer(1,100)"
}
},
"x-schema-orders": [
"admin",
"areaCodes",
"areaNames",
"expireTime",
"id",
"loginName",
"mobile",
"realName",
"siteIds",
"userType"
]
},
"token": {
"type": "string",
"description": "用户token",
"x-schema-mock": "@guid()"
}
},
"x-schema-orders": [
"user",
"token"
]
}
},
"x-schema-orders": [
"msg",
"code",
"data"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "24b21d697fe5d8",
"parent_id": "24b21d697fe5d3",
"target_type": "api",
"name": "用户登出",
"version": 4,
"sort": 3000,
"method": "POST",
"url": "{{baseUrl}}/login/logout",
"protocol": "http/1.1",
"mark_id": "1",
"description": "用户退出注销",
"request": {
"auth": {
"type": "inherit",
"kv": {
"key": "",
"value": "",
"in": "header"
},
"bearer": {
"key": ""
},
"basic": {
"username": "",
"password": ""
},
"digest": {
"username": "",
"password": "",
"realm": "",
"nonce": "",
"algorithm": "",
"qop": "",
"nc": "",
"cnonce": "",
"opaque": ""
},
"hawk": {
"authId": "",
"authKey": "",
"algorithm": "",
"user": "",
"nonce": "",
"extraData": "",
"default": "",
"delegation": "",
"timestamp": "",
"includePayloadHash": false
},
"awsv4": {
"accessKey": "",
"secretKey": "",
"region": "",
"service": "",
"sessionToken": "",
"addAuthDataToQuery": false
},
"ntlm": {
"username": "",
"password": "",
"entity": "",
"workstation": "",
"disableRetryRequest": false
},
"edgegrid": {
"accessToken": "",
"clientToken": "",
"clientSecret": "",
"nonce": "",
"timestamp": "",
"baseURi": "",
"headersToSign": ""
},
"oauth1": {
"consumerKey": "",
"consumerSecret": "",
"signatureMethod": "HMAC-SHA1",
"addEmptyParamsToSign": true,
"includeBodyHash": true,
"addParamsToHeader": false,
"disableHeaderEncoding": false,
"realm": "",
"version": "1.0",
"nonce": "",
"timestamp": "",
"verifier": "",
"callback": "",
"tokenSecret": "",
"token": ""
},
"jwt": {
"addTokenTo": "header",
"algorithm": "HS256",
"secret": "",
"isSecretBase64Encoded": false,
"payload": "",
"headerPrefix": "Bearer",
"queryParamKey": "token",
"header": ""
},
"asap": {
"alg": "HS256",
"iss": "",
"aud": "",
"kid": "",
"privateKey": "",
"sub": "",
"claims": "",
"exp": ""
}
},
"body": {
"mode": "json",
"parameter": [],
"raw": "{}",
"raw_parameter": [],
"raw_schema": {
"type": "object",
"required": [],
"properties": [],
"description": "",
"x-schema-orders": []
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "{\n\t\"msg\": \"登出成功\",\n\t\"code\": 1\n}",
"raw_parameter": [
{
"param_id": "4519912a74e6010",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6011",
"description": "",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "登出成功",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6012",
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [],
"properties": {
"msg": {
"type": "string",
"x-schema-mock": "登出成功"
},
"code": {
"type": "integer",
"x-schema-mock": "1"
}
},
"x-schema-orders": [
"msg",
"code"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "24b21d697fe5d9",
"parent_id": "24b21d697fe5d3",
"target_type": "api",
"name": "用户修改密码",
"version": 4,
"sort": 4000,
"method": "POST",
"url": "{{baseUrl}}/user/change/password",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
"auth": {
"type": "inherit",
"kv": {
"key": "",
"value": "",
"in": "header"
},
"bearer": {
"key": ""
},
"basic": {
"username": "",
"password": ""
},
"digest": {
"username": "",
"password": "",
"realm": "",
"nonce": "",
"algorithm": "",
"qop": "",
"nc": "",
"cnonce": "",
"opaque": ""
},
"hawk": {
"authId": "",
"authKey": "",
"algorithm": "",
"user": "",
"nonce": "",
"extraData": "",
"default": "",
"delegation": "",
"timestamp": "",
"includePayloadHash": false
},
"awsv4": {
"accessKey": "",
"secretKey": "",
"region": "",
"service": "",
"sessionToken": "",
"addAuthDataToQuery": false
},
"ntlm": {
"username": "",
"password": "",
"entity": "",
"workstation": "",
"disableRetryRequest": false
},
"edgegrid": {
"accessToken": "",
"clientToken": "",
"clientSecret": "",
"nonce": "",
"timestamp": "",
"baseURi": "",
"headersToSign": ""
},
"oauth1": {
"consumerKey": "",
"consumerSecret": "",
"signatureMethod": "HMAC-SHA1",
"addEmptyParamsToSign": true,
"includeBodyHash": true,
"addParamsToHeader": false,
"disableHeaderEncoding": false,
"realm": "",
"version": "1.0",
"nonce": "",
"timestamp": "",
"verifier": "",
"callback": "",
"tokenSecret": "",
"token": ""
},
"jwt": {
"addTokenTo": "header",
"algorithm": "HS256",
"secret": "",
"isSecretBase64Encoded": false,
"payload": "",
"headerPrefix": "Bearer",
"queryParamKey": "token",
"header": ""
},
"asap": {
"alg": "HS256",
"iss": "",
"aud": "",
"kid": "",
"privateKey": "",
"sub": "",
"claims": "",
"exp": ""
}
},
"body": {
"mode": "json",
"parameter": [],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object",
"required": [
"loginName",
"oldPwd",
"newPwd"
],
"properties": {
"newPwd": {
"type": "string",
"description": "新密码",
"x-schema-mock": "@string( @word, 8, 16 )"
},
"oldPwd": {
"type": "string",
"description": "旧密码",
"x-schema-mock": "@string( @word, 8, 16 )"
},
"loginName": {
"type": "string",
"description": "用户名",
"x-schema-mock": "@word()"
}
},
"description": "",
"x-schema-orders": [
"loginName",
"oldPwd",
"newPwd"
]
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "{\n\t\"msg\": \"成功\",\n\t\"code\": 6882800553454135\n}",
"raw_parameter": [
{
"param_id": "4519912a74e6013",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6014",
"description": "",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "成功",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6015",
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "6882800553454135",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6016",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6017",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data.user",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6018",
"description": "是否为管理员",
"field_type": "boolean",
"is_checked": 1,
"key": "data.user.admin",
"not_null": 1,
"value": "false",
"schema": {
"type": "boolean"
}
},
{
"param_id": "4519912a74e6019",
"description": "所属区域编码",
"field_type": "string",
"is_checked": 1,
"key": "data.user.areaCodes",
"not_null": 1,
"value": "511500000000,511500000001",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e601a",
"description": "所属区域名称",
"field_type": "string",
"is_checked": 1,
"key": "data.user.areaNames",
"not_null": 1,
"value": "宜宾市,北京市",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e601b",
"description": "token过期时间",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.expireTime",
"not_null": 1,
"value": "48",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e601c",
"description": "用户id",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.id",
"not_null": 1,
"value": "5",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e601d",
"description": "登录名",
"field_type": "string",
"is_checked": 1,
"key": "data.user.loginName",
"not_null": 1,
"value": "Betty",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e601e",
"description": "电话",
"field_type": "string",
"is_checked": 1,
"key": "data.user.mobile",
"not_null": 1,
"value": "028-81382114",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e601f",
"description": "用户真实名称",
"field_type": "string",
"is_checked": 1,
"key": "data.user.realName",
"not_null": 1,
"value": "陆秀兰",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6020",
"description": "用户所属站点ids",
"field_type": "string",
"is_checked": 1,
"key": "data.user.siteIds",
"not_null": 1,
"value": "1,2",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6021",
"description": "用户类型",
"field_type": "integer",
"is_checked": 1,
"key": "data.user.userType",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6022",
"description": "用户token",
"field_type": "string",
"is_checked": 1,
"key": "data.token",
"not_null": 1,
"value": "D54941Ab-4b6F-7D07-Bf6d-fc1abD93D0e2",
"schema": {
"type": "string"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [],
"properties": {
"msg": {
"type": "string",
"x-schema-mock": "修改成功"
},
"code": {
"type": "integer",
"x-schema-mock": "1"
}
},
"x-schema-orders": [
"code",
"msg"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "24b21d697fe5da",
"parent_id": "24b21d697fe5d3",
"target_type": "api",
"name": "上传附件",
"version": 4,
"sort": 5000,
"method": "POST",
"url": "{{baseUrl}}/file/commonupload",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
"body": {
"mode": "form-data",
"parameter": [
{
"param_id": "45199129f0e6003",
"description": "附件",
"field_type": "string",
"is_checked": 1,
"key": "file",
"not_null": 1,
"value": "",
"content_type": "",
"file_name": "conf.zip",
"file_base64": "",
"schema": {
"type": "string"
}
},
{
"param_id": "45199129f0e6004",
"description": "附件存放相对路径,候默认为/file/fileupload",
"field_type": "string",
"is_checked": 1,
"key": "prePath",
"not_null": 1,
"value": "/file/fileupload",
"content_type": "",
"file_name": "",
"file_base64": "",
"schema": {
"type": "string"
}
}
],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object"
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "{\n\t\"code\": 1,\n\t\"msg\": \"上传成功\",\n\t\"fileName\": \"926164.jpg\",\n\t\"url\": \"/file/preview/1685671458914.jpg\"\n}",
"raw_parameter": [
{
"param_id": "4519912a74e6023",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6024",
"description": "结果码(-1.失败,1.成功)",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6025",
"description": "消息",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "上传成功",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6026",
"description": "文件名",
"field_type": "string",
"is_checked": 1,
"key": "fileName",
"not_null": 1,
"value": "926164.jpg",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6027",
"description": "文件相对地址",
"field_type": "string",
"is_checked": 1,
"key": "url",
"not_null": 1,
"value": "/file/preview/1685671458914.jpg",
"schema": {
"type": "string"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [
"fileName",
"code",
"url"
],
"properties": {
"msg": {
"type": "string",
"description": "消息",
"x-schema-mock": "上传成功"
},
"url": {
"type": "string",
"description": "文件相对地址",
"x-schema-mock": "/file/preview/1685671458914.jpg"
},
"code": {
"type": "integer",
"description": "结果码(-1.失败,1.成功)",
"x-schema-mock": "@integer(-1,1)"
},
"fileName": {
"type": "string",
"description": "文件名",
"x-schema-mock": "@zip().jpg"
}
},
"x-schema-orders": [
"code",
"msg",
"fileName",
"url"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "24b21d697fe5db",
"parent_id": "24b21d697fe5d3",
"target_type": "api",
"name": "查询参数列表",
"version": 4,
"sort": 6000,
"method": "POST",
"url": "{{baseUrl}}/param/list",
"protocol": "http/1.1",
"mark_id": "1",
"description": "字典参数列表查询",
"request": {
"body": {
"mode": "json",
"parameter": [],
"raw": "{\n\t\"page\": 2,\n\t\"size\": 32,\n\t\"firstOrganize\": \"firstOrganize\",\n\t\"secondOrganize\": \"secondOrganize\",\n\t\"paramKey\": \"key\"\n}",
"raw_parameter": [
{
"param_id": "45199129f0e6005",
"description": "当前页",
"field_type": "integer",
"is_checked": 1,
"key": "page",
"not_null": -1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "45199129f0e6006",
"description": "每页条数,值为-1,查询所有记录",
"field_type": "integer",
"is_checked": 1,
"key": "size",
"not_null": -1,
"value": "10",
"schema": {
"type": "integer"
}
},
{
"param_id": "45199129f0e6007",
"description": "第一级组织",
"field_type": "string",
"is_checked": 1,
"key": "firstOrganize",
"not_null": -1,
"value": "Window",
"schema": {
"type": "string"
}
},
{
"param_id": "45199129f0e6008",
"description": "第二级组织",
"field_type": "string",
"is_checked": 1,
"key": "secondOrganize",
"not_null": -1,
"value": "hongqi",
"schema": {
"type": "string"
}
},
{
"param_id": "45199129f0e6009",
"description": "参数key",
"field_type": "string",
"is_checked": 1,
"key": "key",
"not_null": -1,
"value": "test",
"schema": {
"type": "string"
}
}
],
"raw_schema": {
"type": "object",
"required": [
"page",
"size"
],
"properties": {
"page": {
"type": "integer",
"description": "当前页",
"x-schema-mock": "@integer(1,10)"
},
"size": {
"type": "integer",
"description": "每页条数,值为-1,查询所有记录",
"x-schema-mock": "@integer(-1,100)"
},
"paramKey": {
"type": "string",
"description": "参数key",
"x-schema-mock": "key"
},
"firstOrganize": {
"type": "string",
"description": "第一级组织",
"x-schema-mock": "firstOrganize"
},
"secondOrganize": {
"type": "string",
"description": "第二集组织",
"x-schema-mock": "secondOrganize"
}
},
"description": "",
"x-schema-orders": [
"page",
"size",
"firstOrganize",
"secondOrganize",
"paramKey"
]
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "{\n\t\"data\": {\n\t\t\"data\": [\n\t\t\t{\n\t\t\t\t\"id\": 74,\n\t\t\t\t\"name\": \"crmtb\",\n\t\t\t\t\"paramKey\": \"duodbh\",\n\t\t\t\t\"paramValue\": \"xuccnvif\"\n\t\t\t}\n\t\t]\n\t},\n\t\"code\": 1,\n\t\"msg\": \"查询成功\"\n}",
"raw_parameter": [
{
"param_id": "4519912a74e6028",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e6029",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e602a",
"description": "",
"field_type": "array",
"is_checked": 1,
"key": "data.data",
"not_null": 1,
"value": "-",
"schema": {
"type": "array"
}
},
{
"param_id": "4519912a74e602b",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data.data.0",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a74e602c",
"description": "ID",
"field_type": "integer",
"is_checked": 1,
"key": "data.data.0.id",
"not_null": 1,
"value": "74",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e602d",
"description": "名称",
"field_type": "string",
"is_checked": 1,
"key": "data.data.0.name",
"not_null": 1,
"value": "crmtb",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e602e",
"description": "参数键key",
"field_type": "string",
"is_checked": 1,
"key": "data.data.0.paramKey",
"not_null": 1,
"value": "duodbh",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e602f",
"description": "参数值",
"field_type": "string",
"is_checked": 1,
"key": "data.data.0.paramValue",
"not_null": 1,
"value": "xuccnvif",
"schema": {
"type": "string"
}
},
{
"param_id": "4519912a74e6030",
"description": "结果码",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a74e6031",
"description": "描述消息",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "查询成功",
"schema": {
"type": "string"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [
"data",
"code",
"msg"
],
"properties": {
"msg": {
"type": "string",
"description": "描述消息",
"x-schema-mock": "查询成功"
},
"code": {
"type": "integer",
"description": "结果码",
"x-schema-mock": "1"
},
"data": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"paramKey",
"paramValue"
],
"properties": {
"id": {
"type": "integer",
"description": "ID",
"x-schema-mock": "@integer(1,100)"
},
"name": {
"type": "string",
"description": "名称",
"x-schema-mock": "@word()"
},
"paramKey": {
"type": "string",
"description": "参数键key",
"x-schema-mock": "@word()"
},
"paramValue": {
"type": "string",
"description": "参数值",
"x-schema-mock": "@word()"
}
},
"x-schema-orders": [
"id",
"name",
"paramKey",
"paramValue"
]
}
}
},
"x-schema-orders": [
"data"
]
}
},
"x-schema-orders": [
"data",
"code",
"msg"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
<#list tableList as table>
{
"target_id": "${table_index}",
"parent_id": "0",
"target_type": "folder",
"name": "${table.functionName}",
"version": 5,
"sort": ${table_index+2},
"server_id": "0",
"description": "",
"request": {
"pre_tasks": [],
"post_tasks": [],
"body": {
"parameter": []
},
"header": {
"parameter": []
},
"query": {
"parameter": []
},
"cookie": {
"parameter": []
}
}
},
{
"target_id": "${table_index}-1",
"parent_id": "${table_index}",
"target_type": "api",
"name": "查询${table.functionName}列表",
"version": 5,
"sort": 1000,
"method": "POST",
"url": "{{baseUrl}}/${table.requestMapping}/list",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
"body": {
"mode": "json",
"parameter": [
{
"param_id": "4519912a10e6011",
"description": "当前页",
"field_type": "integer",
"is_checked": 1,
"key": "page",
"not_null": -1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a10e6012",
"description": "每页条数,值为-1,查询所有记录",
"field_type": "integer",
"is_checked": 1,
"key": "size",
"not_null": -1,
"value": "10",
"schema": {
"type": "integer"
}
} <#list table.columns as column>
<#if column.isQuery == 1>
,{
<#if column.javaType=="String">
"description":"${column.columnComment},字段前后添加%%模糊查询",
"type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"description":"${column.columnComment}",
"type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"description":"${column.columnComment}",
<#elseif column.javaType == "Date">
"field_type":"string",
"description":"${column.columnComment}",
<#else>
"description":"${column.columnComment}",
"field_type":"string",
</#if>
"key":"${column.javaField}",
"value":"${column.randomStr(column.javaType)}"
}
</#if>
</#list>
],
"raw": "",
"raw_parameter": [
{
"param_id": "4519912a14e6000",
"description": "当前页",
"field_type": "integer",
"is_checked": 1,
"key": "page",
"not_null": -1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a14e6001",
"description": "每页条数,值为-1,查询所有记录",
"field_type": "integer",
"is_checked": 1,
"key": "size",
"not_null": -1,
"value": "10",
"schema": {
"type": "integer"
}
} <#list table.columns as column>
<#if column.isQuery == 1>
,{
<#if column.javaType=="String">
"description":"${column.columnComment},字段前后添加%%模糊查询",
"field_type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"description":"${column.columnComment}",
"field_type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"description":"${column.columnComment}",
<#elseif column.javaType == "Date">
"field_type":"date",
"description":"${column.columnComment}",
<#else>
"description":"${column.columnComment}",
"field_type":"string",
</#if>
"key":"${column.javaField}",
"value":"${column.randomStr(column.javaType)}"
}
</#if>
</#list>
],
"raw_schema": {
"type": "object",
"properties": {
"page": {
"mock": {
"mock": "1"
},
"type": "integer",
"description": "当前页"
},
"size": {
"mock": {
"mock": "20"
},
"type": "integer",
"description": "每页条数,值为-1,查询所有记录"
}
},
"description": ""
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "",
"raw_parameter": [
{
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"description": "数据对象",
"field_type": "object",
"is_checked": 1,
"key": "data",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "data.per_page",
"not_null": 1,
"value": "10",
"schema": {
"type": "integer"
}
},
{
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "data.total",
"not_null": 1,
"value": "12",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a80e6031",
"description": "",
"field_type": "array",
"is_checked": 1,
"key": "data.data",
"not_null": 1,
"value": "-",
"schema": {
"type": "array"
}
},
{
"param_id": "4519912a80e6032",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data.data.0",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
}
<#list table.columns as column>
,
{
"description":"${column.columnComment}",
"is_checked":1,
"key":"data.data.0.${column.javaField}",
"not_null":true,
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
"value":"${column.randomStr(column.javaType)}"
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
"value":${column.randomStr(column.javaType)}
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
"value":"${column.randomStr(column.javaType)}"
<#elseif column.javaType == "Date">
"field_type":"integer",
"type":"integer",
"value":1686117130116
<#else>
"field_type":"string",
"type":"string",
"value":"${column.randomStr(column.javaType)}"
</#if>
}
</#list>
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [],
"properties": {
"msg": {
"type": "string",
"description": "消息"
},
"code": {
"type": "integer",
"description": "结果码(-1.失败,1.成功)"
},
"data": {
"type": "object",
"required": [],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [],
"properties": {
"id": {
"type": "integer",
"field_type": "integer",
"description": "园区id",
"x-schema-mock": "@integer(1,10)"
},
<#list table.columns as column>
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
"x-schema-mock": "@word",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
"x-schema-mock": "@integer(1,10)",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
"x-schema-mock": "@float( 1, 10, 2, 2 )",
<#elseif column.javaType == "Date">
"field_type":"integer",
"type":"integer"
"x-schema-mock": "@integer(1686120510000,1686120517127)",
<#else>
"field_type":"string",
"type":"string",
"x-schema-mock": "@word",
</#if>
"description": "${column.columnComment}"
}<#sep>,</#sep>
</#list>
<#if table.subTable?? && table.tplCategory=="sub" >
,
"${table.subTable.className?uncap_first}List": {
"type": "array",
"description": "${table.subTable.functionName}列表信息",
"items": {
"type": "object",
"title": "Items",
"properties": {
<#list table.subTable.columns as column >
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
"x-schema-mock": "@word",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
"x-schema-mock": "@integer(1,10)",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
"x-schema-mock": "@float( 1, 10, 2, 2 )",
<#elseif column.javaType == "Date">
"field_type":"integer",
"type":"integer",
"x-schema-mock": "@integer(1686120510000,1686120517127)",
<#else>
"field_type":"string",
"type":"string",
"x-schema-mock": "@word",
</#if>
"description": "${column.columnComment}"
}<#sep>,</#sep>
</#list>
},
"APIPOST_ORDERS": [],
"required": []
}
}
</#if>
},
"x-schema-orders": []
}
},
"total": {
"type": "integer",
"x-schema-mock": "@integer(1,100)"
},
"per_page": {
"type": "integer",
"x-schema-mock": "@integer(1,10)"
},
"last_page": {
"type": "integer",
"x-schema-mock": "1"
},
"current_page": {
"type": "integer"
}
},
"description": "数据对象",
"x-schema-orders": []
},
"dict": {
"type": "object",
"required": [],
"properties": {
<#assign isFirst>true</#assign>
<#list table.columns as column>
<#if column.dict??>
<#if isFirst == "false">,</#if>
<#assign isFirst>false</#assign>
<#assign comment=column.subComment(column.columnComment) />
"${column.javaField}":{
"description":"${comment}",
"type":"object",
"properties":{
<#list column.dict as dict>
"${dict.num}": {
"type": "string",
"description": "${dict.value}"
}<#sep>,</#sep>
</#list>
},
"required":[]
}
</#if>
</#list>
},
"description": "字典对象",
"x-schema-orders": []
}
},
"x-schema-orders": []
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "${table_index}-2",
"parent_id": "${table_index}",
"target_type": "api",
"name": "${table.functionName}",
"version": 5,
"sort": 2000,
"method": "GET",
"url": "{{baseUrl}}/${table.requestMapping}/info?id=1",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
},
"body": {
"mode": "urlencoded",
"parameter": [
{
"param_id": "4519912a14e6002",
"description": "ID",
"field_type": "integer",
"is_checked": 1,
"key": "${table.pkColumn.javaField}",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
}
],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object"
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": []
},
"query": {
"query_add_equal": 1,
"parameter": [
{
"param_id": "4519912a14e6003",
"description": "ID",
"field_type": "integer",
"is_checked": 1,
"key": "${table.pkColumn.javaField}",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
}
]
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "",
"raw_parameter": [
{
"param_id": "4519912a80e603d",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a80e603e",
"description": "",
"field_type": "integer",
"is_checked": 1,
"key": "code",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
},
{
"param_id": "4519912a80e603f",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "data",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
}
<#list table.columns as column>
,
{
"description": "${column.columnComment}",
<#if column.javaType=="String">
"field_type":"string",
"type": "string",
"value":"${column.randomStr(column.javaType)}",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type": "integer",
"value":${column.randomStr(column.javaType)},
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type": "number",
"value":${column.randomStr(column.javaType)},
<#elseif column.javaType == "Date">
"field_type":"integer",
"type": "integer",
"value":1686117130116,
<#else>
"field_type":"string",
"type": "string",
"value":"${column.randomStr(column.javaType)}",
</#if>
"is_checked": 1,
"key": "data.${column.javaField}",
"not_null": true
}
</#list>
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [
"code"
],
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "object",
"required": [],
"properties": {
<#list table.columns as column>
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
<#elseif column.javaType == "Date">
"field_type":"integer",
"type":"integer",
<#else>
"field_type":"string",
"type":"string",
</#if>
"description": "${column.columnComment}"
}<#sep>,</#sep>
</#list>
<#if table.subTable?? && table.tplCategory=="sub" >
,
"${table.subTable.className?uncap_first}List": {
"type": "array",
"description": "${table.subTable.functionName}列表信息",
"items": {
"type": "object",
"title": "Items",
"properties": {
<#list table.subTable.columns as column >
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
<#elseif column.javaType == "Date">
"field_type":"integer",
"type":"integer",
<#else>
"field_type":"string",
"type":"string",
</#if>
"description": "${column.columnComment}"
}<#sep>,</#sep>
</#list>
},
"APIPOST_ORDERS": [],
"required": []
}
}
</#if>
},
"x-schema-orders": []
},
"dict": {
"type": "object",
"required": [],
"properties":{
<#assign isFirst>true</#assign>
<#list table.columns as column>
<#if column.dict??>
<#if isFirst == "false">,</#if>
<#assign isFirst>false</#assign>
<#assign comment=column.subComment(column.columnComment) />
"${column.javaField}":{
"description":"${comment}",
"type":"object",
"properties":{
<#list column.dict as dict>
"${dict.num}": {
"type": "string",
"mock": {
"mock": "${dict.value}"
},
"description": "${dict.value}"
}<#sep>,</#sep>
</#list>
},
"required":[]
}
</#if>
</#list>
},
"x-schema-orders": []
}
},
"x-schema-orders": [
"code",
"data",
"dict"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "${table_index}-3",
"parent_id": "${table_index}",
"target_type": "api",
"name": "${table.functionName}删除",
"version": 5,
"sort": 3000,
"method": "GET",
"url": "{{baseUrl}}/${table.requestMapping}/delete?id=1",
"protocol": "http/1.1",
"mark_id": "1",
"description": "",
"request": {
},
"body": {
"mode": "none",
"parameter": [],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object"
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": [
{
"param_id": "4519912a14e6004",
"description": "用户登录鉴权token",
"field_type": "integer",
"is_checked": 1,
"key": "Authorization",
"not_null": 1,
"value": "{{token}}",
"schema": {
"type": "integer"
}
}
]
},
"query": {
"query_add_equal": 1,
"parameter": [
{
"param_id": "4519912a14e6005",
"description": "ID",
"field_type": "integer",
"is_checked": 1,
"key": "${table.pkColumn.javaField}",
"not_null": 1,
"value": "1",
"schema": {
"type": "integer"
}
}
]
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [
"code",
"msg"
],
"properties": {
"msg": {
"type": "string",
"x-schema-mock": "删除成功"
},
"code": {
"type": "integer",
"x-schema-mock": "1"
}
},
"x-schema-orders": [
"code",
"msg"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
},
{
"target_id": "${table_index}-4",
"parent_id": "${table_index}",
"target_type": "api",
"name": "${table.functionName}更新与保存",
"version": 5,
"sort": 4000,
"method": "POST",
"url": "{{baseUrl}}/${table.requestMapping}/save",
"protocol": "http/1.1",
"mark_id": "1",
"description": "${table.pkColumn.javaField}为空时为新增保存,否则为更新提交",
"request": {
"body": {
"mode": "json",
"parameter": [
{
"param_id": "4519912a14e6007",
"description": "id为空时为新增,否则为更新",
"field_type": "integer",
"is_checked": 1,
"key": "id",
"not_null": -1,
"value": "1",
"content_type": "",
"file_name": "",
"file_base64": "",
"schema": {
"type": "integer"
}
},
<#assign isFirst>true</#assign>
<#list table.columns as column>
<#if !column.isSuperColumn(column.javaField)>
<#if isFirst == "false">,</#if>
<#assign isFirst>false</#assign>
{
"key":"${column.javaField}",
"is_checked": 1,
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
<#elseif column.javaType == "Date">
"field_type":"string",
"type":"string",
<#else>
"field_type":"string",
"type":"string",
</#if>
"value":"${column.randomStr(column.javaType)}",
"description": "${column.columnComment}"
}
</#if>
</#list>
<#if table.subTable?? && table.tplCategory=="sub" >
,
{
"description": "${table.subTable.functionName}列表",
"is_checked": 1,
"key": "${table.subTable.className?uncap_first}List",
"type": "array",
"not_null": "-1",
"field_type": "array",
"value": ""
}
<#list table.subTable.columns as column >
<#if !column.isSuperColumn(column.javaField)>
,
{
"value": "",
"not_null": "-1",
"is_checked": 1,
"key": "array[0].${column.javaField}",
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
<#elseif column.javaType == "Date">
"field_type":"string",
"type":"string",
<#else>
"field_type":"string",
"type":"string",
</#if>
"description": "${column.columnComment}"
}
</#if>
</#list>
</#if>
],
"raw": "",
"raw_parameter": [],
"raw_schema": {
"type": "object",
"required": [],
"properties": {
"${table.pkColumn.javaField}":{
"field_type":"integer",
"type":"integer",
"mock": {
"mock": "@integer(1,100)"
},
"description": "${table.pkColumn.javaField}为空时为新增保存,否则为更新提交"
},
<#assign isFirst>true</#assign>
<#list table.columns as column>
<#if !column.isSuperColumn(column.javaField)>
<#if isFirst == "false">,</#if>
<#assign isFirst>false</#assign>
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
"mock": {
"mock": "@word"
},
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
"mock": {
"mock": "@integer(1,100)"
},
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
"mock": {
"mock": "@float( 1, 10, 2, 2 )"
},
<#elseif column.javaType == "Date">
"field_type":"string",
"type":"string",
"mock": {
"mock": "@datetime('yyyy-MM-dd HH:mm:ss')"
},
<#else>
"field_type":"string",
"type":"string",
"mock": {
"mock": "@word"
},
</#if>
"description": "${column.columnComment}"
}
</#if>
</#list>
<#if table.subTable?? && table.tplCategory=="sub" >
,
"${table.subTable.className?uncap_first}List": {
"type": "array",
"description": "${table.subTable.functionName}列表信息",
"items": {
"type": "object",
"title": "Items",
"properties": {
<#assign isFirst>true</#assign>
<#list table.subTable.columns as column >
<#if !column.isSuperColumn(column.javaField)>
<#if isFirst == "false">,</#if>
<#assign isFirst>false</#assign>
"${column.javaField}":{
<#if column.javaType=="String">
"field_type":"string",
"type":"string",
"mock": {
"mock": "@word"
},
<#elseif column.javaType == "Long"|| column.javaType=="Integer">
"field_type":"integer",
"type":"integer",
"mock": {
"mock": "@integer(1,10)"
},
<#elseif column.javaType == "BigDecimal">
"field_type":"number",
"type":"number",
"mock": {
"mock": "@float( 1, 10, 2, 2 )"
},
<#elseif column.javaType == "Date">
"field_type":"string",
"type":"string",
"mock": {
"mock": "@datetime('yyyy-MM-dd HH:mm:ss')"
},
<#else>
"field_type":"string",
"type":"string",
"mock": {
"mock": "@word"
},
</#if>
"description": "${column.columnComment}"
}
</#if>
</#list>
},
"APIPOST_ORDERS": [],
"required": []
}
}
</#if>
},
"x-schema-orders": []
},
"binary": {}
},
"pre_tasks": [],
"post_tasks": [],
"header": {
"parameter": [
{
"param_id": "4519912a14e600e",
"description": "用户登录鉴权token",
"field_type": "string",
"is_checked": 1,
"key": "Authorization",
"not_null": 1,
"value": "{{token}}",
"schema": {
"type": "string"
}
}
]
},
"query": {
"query_add_equal": 1,
"parameter": []
},
"cookie": {
"cookie_encode": 1,
"parameter": []
},
"restful": {
"parameter": []
}
},
"response": {
"example": [
{
"example_id": "1",
"raw": "",
"raw_parameter": [
{
"param_id": "4519912a80e604a",
"description": "",
"field_type": "object",
"is_checked": 1,
"key": "",
"not_null": 1,
"value": "-",
"schema": {
"type": "object"
}
},
{
"param_id": "4519912a80e604b",
"description": "",
"field_type": "string",
"is_checked": 1,
"key": "msg",
"not_null": 1,
"value": "添加或修改成功!",
"schema": {
"type": "string"
}
}
],
"headers": [],
"expect": {
"code": "200",
"content_type": "json",
"is_default": 1,
"mock": "",
"name": "成功",
"schema": {
"type": "object",
"required": [
"msg",
"code"
],
"properties": {
"msg": {
"type": "string",
"x-schema-mock": "保存更新成功!"
},
"code": {
"type": "integer",
"x-schema-mock": "1"
}
},
"x-schema-orders": [
"msg",
"code"
]
},
"verify_type": "schema",
"sleep": 0
}
},
{
"example_id": "2",
"raw": "",
"raw_parameter": [],
"headers": [],
"expect": {
"code": "404",
"content_type": "json",
"is_default": -1,
"mock": "",
"name": "失败",
"schema": {
"type": "object"
},
"verify_type": "schema",
"sleep": 0
}
}
],
"is_check_result": 1
},
"mock_server_enable": -1,
"attribute_info": {},
"tags": []
}
<#sep>,</#sep>
</#list>
],
"samples": [],
"automated_testings": []
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment