wiki文档模板

### 1.字段列表

* 接口地址:api/field/list

* 请求方式:POST

* 接口用途:获取字段列表

* 请求字段:

| 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| entityCode | String | 实体code | 是 |

| pageNum | Integer | 页数 | 是 |

| pageSize | Integer | 每页条数 | 是 |

扫描二维码关注公众号,回复: 8530216 查看本文章

* 请求参数格式

```

{

"entityCode": "5bcae34a4f50ea4ce4c7d599",

"pageNum": 2,

"pageSize": 10

}

```

* 返回数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": {

"total": 13,

"list": [

{

"id": "5bcaf36b4f50ea557c3c2d4a",

"code": "5bcaf36b4f50ea557c3c2d4a",

"fieldAlias": "email",

"columnName": null,

"name": "邮箱",

"entityCode": "5bcae34a4f50ea4ce4c7d599",

"fieldType": 3,

"unit": null,

"javaType": null,

"jdbcType": null,

"maxLength": null,

"selectType": null,

"saveType": null,

"dictType": null,

"defaultDictItem": null,

"relateApp": null,

"relateEntity": null,

"relateField": null,

"relateShowField": null,

"relateView": null,

"relateRatio": null,

"relateExpr": null,

"isCascadeOperating": null,

"decimalPattern": null,

"decimalDigits": null,

"datasourceCode": null,

"isAvailable": null,

"isExtensible": null,

"isAllowedQuery": null,

"deleteFlag": null,

"sortOrder": null,

"isRequired": null,

"defaultValue": null,

"description": null,

"tenantId": null,

"metadataType": null,

"createTime": null,

"createUser": null,

"updateTime": null,

"updateUser": null

}

],

"pageNum": 2,

"pageSize": 10,

"size": 3,

"startRow": 11,

"endRow": 13,

"pages": 2,

"prePage": 1,

"nextPage": 0,

"isFirstPage": false,

"isLastPage": true,

"hasPreviousPage": true,

"hasNextPage": false,

"navigatePages": 8,

"navigatepageNums": [

1,

2

],

"navigateFirstPage": 1,

"navigateLastPage": 2,

"firstPage": 1,

"lastPage": 2

},

"success": true

}

```

### 2.字段详情

* 接口地址:api/entity/get

* 请求方式:POST

* 接口用途:根据字段id等获取字段详情

* 请求字段:

* | 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| id | String | 字段id | 是 |

* 请求参数格式

```

{

"id": "5bcaf36b4f50ea557c3c2d4a"

}

```

* 返回数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": {

"id": "5bcaf36b4f50ea557c3c2d4a",

"code": "5bcaf36b4f50ea557c3c2d4a",

"fieldAlias": "email",

"columnName": "email",

"name": "邮箱",

"entityCode": "5bcae34a4f50ea4ce4c7d599",

"fieldType": 3,

"unit": null,

"javaType": null,

"jdbcType": null,

"maxLength": 32,

"selectType": null,

"saveType": 0,

"dictType": "",

"defaultDictItem": "",

"relateApp": null,

"relateEntity": null,

"relateField": null,

"relateShowField": null,

"relateView": null,

"relateRatio": null,

"relateExpr": null,

"isCascadeOperating": false,

"decimalPattern": null,

"decimalDigits": null,

"datasourceCode": null,

"isAvailable": true,

"isExtensible": true,

"isAllowedQuery": true,

"deleteFlag": 1,

"sortOrder": 3,

"isRequired": false,

"defaultValue": null,

"description": "学生邮箱",

"tenantId": null,

"metadataType": null,

"createTime": null,

"createUser": null,

"updateTime": null,

"updateUser": null

},

"success": true

}

```

### 3.字段新增

* 接口地址:api/field/insert

* 请求方式:POST

* 接口用途:字段新增

* 请求字段:

| 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| fieldAlias | String | 字段编码 | 是 |

| name | String | 字段名称 | 是 |

| columnName | String | 对应列名 | 是 |

| entityCode | String | 所属实体code | 是 |

| fieldType | Byte | 字段类型 | 是 |

| isExtensible | Boolean | 是否可定制 | 是 |

| isRequired | Boolean | 是否必须 | 是 |

| unit | String | 单位名称 | 否 |

| description | String | 描述 | 否 |

* 请求参数格式

```

{

"fieldAlias": "xclassTime",

"name": "下课时间",

"columnName": "xclass_time",

"entityCode": "5bcae34a4f50ea4ce4c7d599",

"fieldType": 22,

"isExtensible": 1,

"isRequired": 1,

"unit": "",

"description": "下课时间"

}

```

* 返回数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": null,

"success": true

}

```

### 4.字段修改

* 接口地址:api/field/update

* 请求方式:POST

* 接口用途:字段修改

* 请求字段:

| 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| id | String | id | 是 |

| fieldAlias | String | 字段编码 | 是 |

| name | String | 字段名称 | 是 |

| columnName | String | 对应列名 | 是 |

| entityCode | String | 所属实体code | 是 |

| fieldType | Byte | 字段类型 | 是 |

| isExtensible | Boolean | 是否可定制 | 是 |

| isRequired | Boolean | 是否必须 | 是 |

| unit | String | 单位名称 | 否 |

| description | String | 描述 | 否 |

* 请求参数格式

```

{

"id": "5c73a0a7a627ef1368ef2d9b",

"fieldAlias": "xclassTime",

"name": "下课时间2",

"columnName": "xclass_time",

"entityCode": "5bcae34a4f50ea4ce4c7d599",

"fieldType": 22,

"isExtensible": 1,

"isRequired": 1,

"unit": "",

"description": "下课时间2"

}

```

* 返回数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": null,

"success": true

}

```

### 5.字段删除

* 接口地址:api/field/delete/5c73a0a7a627ef1368ef2d9b

* 请求方式:POST

* 接口用途:字段删除

* 请求字段:

| 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| code | String | 字段code | 是 |

* 请求参数格式

```

url追加参数

```

* 返回成功数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": null,

"success": true

}

* 返回失败数据格式

```

{

"code": "50000",

"msg": "业务处理失败",

"subCode": "NOT_DELETED",

"subMsg": "该项已被引用,不能删除",

"body": null,

"success": false

}

```

### 6.关联字段列表

* 接口地址:api/field/listRelate

* 请求方式:GET

* 接口用途:获取新建字段时获取关联Field列表,请注意在前端增加一个option选项,其展示值为“主键id列”,隐藏值为空字符串,然后再拼接返回的列表值

* 请求字段:

| 名称 | 类型 | 含义 | 是否必传 |

| :------ | :-----: | :----: | :----: |

| entityCode | String | 实体code | 是 |

* 请求参数格式

```

api/field/listRelate?entityCode=5bcae6954f50ea4c0cea15c3

```

* 返回数据格式

```

{

"code": "20000",

"msg": "接口调用成功",

"subCode": null,

"subMsg": "成功",

"body": [

{

"id": "5bcae6954f50ea4c0cea15c5",

"code": "5bcae6954f50ea4c0cea15c5",//下拉列表隐藏值

"fieldAlias": "merchantName"//下拉列表展示值

}

],

"success": true

}

```

发布了293 篇原创文章 · 获赞 27 · 访问量 12万+

猜你喜欢

转载自blog.csdn.net/gwdgwd123/article/details/103509332