# 修改事务
调用本接口,修改当前事务状态
# 权限
要调用此API,需要申请poa能力,获取poa token,接口请求头中添加 Authorization 值为token
# 请求方法
报文样例
POST PUT /apis/ttc/v1/transaction/poa/todo/updateTransaction
Host: poa地址
Authorization:String
Content-Type:application/json
[
{
"transactionId": "xxx",
"status": "smartadmin",
"editAccount": ""
}
]
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
# Header参数
名称 | 类型 | 是否必填 | 描述 |
---|---|---|---|
Authorization | String | 是 | 接口访问凭证 |
# Body参数
名称 | 类型 | 是否必填 | 描述 |
---|---|---|---|
transactionId | String | 是 | 事务ID |
status | String | 是 | 状态: IN_PROGRESS:进行中,BREAK_UP:已终止,HANG_UP:暂时挂起,FINISH :已办结 |
editAccount | String | 否 | 编辑人学工号 |
# 接口调用成功返回
{
"took": 648,
"timestamp": 1669864234995,
"code": 0,
"message": "修改事务成功",
"data": {
"errorIds": []
}
}
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
# 接口调用失败返回
- 接口支持批量,批量操作中的每条数据独立运行,批量中有失败的数据接口整体响应code为0 (成功),data中返回出现错误的数据
{
"took": 100,
"timestamp": 1690425124764,
"code": 0,
"message": "修改事务中有异常数据",
"data": {
"errorIds": [
{
"code": 400,
"taskId": "TRAN002",
"message": "status is illegal"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- data.errorIds.code说明:
code | message | 说明 |
---|---|---|
400 | xxx is null | 参数校验不合法 |
400 | status is illegal | status 参数不合法 |
500 | * | 业务逻辑异常 |
2009 | the transaction is not exist | 事务不存在 |