说明
检查是否发生了变化, 有效变更, 无法变更
请求地址
/v2/webservice/apply/analyze-modify-table
请求参数
| 参数名称 |
类型 |
是否必填 |
说明 |
| app_id |
int |
是 |
业务ID |
| attach_ids |
array |
是 |
文件ID |
| tables |
对象数组 |
是 |
区表信息 |
tables数组元素字段说明
| 参数名称 |
类型 |
是否必填 |
说明 |
| zone_id |
number |
是 |
区ID |
| table_names |
数组, 元素为 string |
是 |
要比较的表 |
请求示例
{
"app_id": 5,
"attach_ids": [
4160
],
"tables": [
{
"zone_id": 1,
"table_names": [
"Bid100150009",
"ListTableDemo",
"GenericTableDemo",
"ItemAttri",
"TestData",
"table_list"
]
}
]
}
返回参数data字段说明
data的类型是对象数组, 数组元素的对象字段说明
| 参数名称 |
类型 |
说明 |
| zone_id |
int |
|
| invaild_modify_table |
对象数组 , 元素为TableInfo |
无效的表变更, 比如新字段的version值错误 |
| same_field_table |
对象数组 , 元素为TableInfo |
没有发生变更的表 |
| diff_field_table |
对象数组 , 元素为TableInfo |
发生了变更的表 |
| only_file_table |
对象数组 , 元素为TableInfo |
不存在的表, (在加表文件中定义了,但是区中没有这个表) |
TableInfo对象
| 参数名称 |
类型 |
说明 |
| status |
number |
0表示变更校验通过,-1表示不可变更 |
| table_name |
string |
|
| err_msg |
string |
不可变更原因 |
返回示例
{
"code": 0,
"request_id": "15826b0f-6ebd-4fe0-b20f-096ea47fe040",
"data": [
{
"zone_id": 1,
"invaild_modify_table": [
{
"status": -1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": true,
"table_field_changed": 0,
"err_msg": "Can not find the table: Bid100150009 in the uploaded xml/tdr files. Please check the uploaded xml/tdr files!",
"table_name": "Bid100150009",
"message": "",
"table_type": 0,
"table_maxnum": 0,
"modify_date": "2024-03-29T08:29:35.000Z",
"table_status": 1,
"attach_ids": [
"2890"
]
},
{
"status": -1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": true,
"table_field_changed": 0,
"err_msg": "Can't reduce list_num from 4941 to 4936",
"table_name": "ListTableDemo",
"message": "",
"table_type": 1,
"table_maxnum": 4941,
"modify_date": "2023-11-13T08:50:50.000Z",
"table_status": 1,
"attach_ids": [
"2570"
],
"customattr2": {
"is_old_define": false,
"table_maxnum": 4936,
"sort_field_num": 0,
"sort_rule": 0
}
},
{
"status": -1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": true,
"table_field_changed": 0,
"err_msg": "The entry can't be found! entry_name:'KeyID2' metaname:'ItemAttri'",
"table_name": "TestData",
"message": "",
"table_type": 0,
"table_maxnum": 0,
"modify_date": "2023-05-06T01:59:09.000Z",
"table_status": 1,
"attach_ids": [
"1149",
"1144"
],
"customattr2": {
"is_old_define": true,
"table_maxnum": 0,
"sort_rule": 0,
"sort_field_num": 0
}
}
],
"same_field_table": [
{
"status": 1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": false,
"table_field_changed": 0,
"err_msg": "",
"table_name": "ItemAttri",
"message": "",
"table_type": 0,
"table_maxnum": 0,
"modify_date": "2024-07-18T10:05:37.000Z",
"table_status": 1,
"attach_ids": [
"4138"
],
"customattr2": {
"is_old_define": true,
"table_maxnum": 0,
"sort_rule": 0,
"sort_field_num": 0
}
},
{
"status": 1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": false,
"table_field_changed": 0,
"err_msg": "",
"table_name": "table_list",
"message": "",
"table_type": 0,
"table_maxnum": 0,
"modify_date": "2022-11-30T06:56:48.000Z",
"table_status": 1,
"attach_ids": [
"1242"
],
"customattr2": {
"is_old_define": true,
"table_maxnum": 0,
"sort_rule": 0,
"sort_field_num": 0
}
}
],
"diff_field_table": [
{
"status": 1,
"new_entry_length_exceeded_count": 0,
"new_entry_length_exceeded": [],
"has_new_entry_count_without_refer": false,
"table_field_changed": 1,
"err_msg": "",
"table_name": "GenericTableDemo",
"message": "GenericTableDemo ValueFieldNum(6) is not equal to GenericTableDemo ValueFieldNum(7)",
"table_type": 0,
"table_maxnum": 0,
"modify_date": "2024-08-20T02:53:24.000Z",
"table_status": 1,
"attach_ids": [
"4138"
],
"customattr2": {
"is_old_define": false,
"table_maxnum": -1,
"sort_field_num": 0,
"sort_rule": 0
}
}
],
"only_file_table": [
{
"fmt_type": "TDR",
"status": 1,
"message": [],
"count_with_refer_check": {
"result": true
},
"entry_length_check": {
"result": true
},
"tdr_version": 1,
"splittable_keys_count": 5,
"table_name": "table_list1",
"customattr2": {
"is_old_define": true,
"table_type": 0,
"table_maxnum": 0,
"sort_field_num": 0,
"sort_rule": 0,
"data_protocol_type": "TBD"
},
"splittable_keys": [
"uin",
"uin1",
"name",
"level",
"count"
],
"splittable_count": 5,
"table_type": [
0,
1
],
"list_check": {
"status": 1,
"message": []
},
"generic_check": {
"status": 1,
"message": []
}
},
{
"fmt_type": "TDR",
"status": 1,
"message": [],
"count_with_refer_check": {
"result": true
},
"entry_length_check": {
"result": true
},
"tdr_version": 1,
"splittable_keys_count": 4,
"table_name": "table_list2",
"customattr2": {
"is_old_define": true,
"table_type": 0,
"table_maxnum": 0,
"sort_field_num": 0,
"sort_rule": 0,
"data_protocol_type": "TBD"
},
"splittable_keys": [
"uin",
"name",
"level",
"count"
],
"splittable_count": 4,
"table_type": [
0,
1
],
"list_check": {
"status": 1,
"message": []
},
"generic_check": {
"status": 1,
"message": []
}
}
],
"disable_table_in_zone": []
}
]
}
错误返回示例 (文件不存在)
{
"request_id": "e4b769bd-4b8c-4776-a310-276aeffcaafe",
"code": 102,
"message": "表文件不存在",
"debug_message": {
"attach_ids": [
416011
],
"method": "getFileExt"
}
}