TableBatchMergeTableData

Apply for Mering Table Data

Request address

POST
http://OmsAddressapp/newoms.php/webservice/business/table/batch-merge-table-data?cmd=10008&ip-type=webservicerest&access-token=AccessTokenVal

POST request parameter description

Field name Data type Whether the field is required Description Remarks
app_id integer Yes id of the app where the source table and target table (service merging table) of the data to be merged are located
src_zone_id integer Yes id of the game zone where the source table of the data to be merged is located
dest_zone_id integer Yes id of the game zone where the target table of the data to be merged is located
tables_info json Yes information of the table to be merged. The format is as follows: {"table_name_1": {"ignore_check_index": 1}, "table_name_2": {"ignore_check_index": 0},} where: 1. ignore_check_index indicates whether to ignore the index check of the table
attention_man string No Separated by semicolon ";" and the maximum length of the field is 200,Interested people can perform this document task

Data Parameters

Use json format to represent the record related information. The following is an example:

{
    "app_id": 3,
    "src_zone_id": 1,
    "dest_zone_id": 2,
    "tables_info": {
        "table_in_same_svr": {
            "ignore_check_index": 1
        },
        "table_in_zone123_1": {
            "ignore_check_index": 0
        }
    }
}

Return Syntax

Return Parameter Description

  1. When the returned status code is not 200, the returned data is a set of key and value in json format

  2. When the returned status code is 200, the return is the application form corresponding to each table that has successfully merged its data. It is required to query the application form details

key key type type of value corresponding to key description of value corresponding to key
key1 string Array error message corresponding to key1
key2 string Array error message corresponding to key2

Request Example

Send A Request through the Curl Method

For the parameters in the command, please refer to the "Description of POST Request Parameters" on this page. For the method to obtain access-token, see: Get access-token

curl -H "Content-type: application/json" -X "POST" -d '{
    "app_id": 3,
    "src_zone_id": 1,
    "dest_zone_id": 2,
    "tables_info": {
        "table_in_same_svr": {
            "ignore_check_index": 1
        },
        "table_in_zone123_1": {
            "ignore_check_index": 0
        }
    }
}' http://omsaddressapp/newoms.php/webservice/business/table/batch-merge-table-data?cmd=10008&ip-type=webservicerest&access-token=\

Return Example

Successful Return Example

Status of http request = 200

[
    {
        "id": 289,
        "set_id": 126,
        "app_id": 3,
        "zone_list": "1",
        "user": "tcaplus",
        "table_name": "table_in_same_svr"
    },
    {
        "id": 290,
        "set_id": 126,
        "app_id": 3,
        "zone_list": "1",
        "user": "tcaplus",
        "table_name": "table_in_zone123_1"
    }
]

Failed Return Example

Status of http request != 200

{
    "name": "Unauthorized",
    "message": "You are requesting with an invalid credential.",
    "code": 0,
    "status": 401,
    "type": "yii\\web UnauthorizedHttpException"
}
{
    "tables_info": [
        "There are unfinished transactions (MergeTableData) user:tcaplus error type:3 trans id:201 set id:126 Memo:MergeTableData"
    ]
}

results matching ""

    No results matching ""