# 2010 火车票、汽车票、船票服务动态

## content_json 定义

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| cur_status | 是 | int32 | 当前状态id |  |
| wxa_path_query | 是 | string | 卡片点击跳转路径与query |  |
| traffic_no | 参考状态要求 | string | 车次 | 会进行数字、字母与符号组合校验 |
| planned_departure_time | 参考状态要求 | uint32 | 计划出发时间 | 秒级时间戳，展示为MM/DD HH:mm格式 |
| planned_arrival_time | 参考状态要求 | uint32 | 计划到达时间 | 秒级时间戳，展示为MM/DD HH:mm格式 |
| departure_city | 参考状态要求 | uint32 | 出发城市 | 最多11个可见字符，如「广州市」，会进行场站校验 |
| arrival_city | 参考状态要求 | uint32 | 到达城市 | 最多11个可见字符，如「广州市」，会进行场站校验 |

**departure_city/arrival_city 定义**

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| domestic_region | 是 | string | 国内行政区名 | 如「广州市」，支持输入到四级行政区名 |
| domestic_poi | 否 | string | 国内POI地址 | 如「ABC大酒店」 |
| oversea_areas | 是 | string | 国外行政区名/机场名 | 如「莫斯科」，支持输入国外城市名/场站名 |

**departure_city/arrival_city 进行场站校验**

1. 查验domestic_region\domestic_poi 有值时进行查询国内地址，否则oversea_areas有值查询海外地址；
2. domestic_region或oversea_areas择一必填，填入domestic_poi时必须填入domestic_poi；
3. domestic_poi、domestic_region、oversea_areas 按顺序，显示先有值的。
        示例：输入「domestic_region=广州市、domestic_poi=ABC大酒店」，显示「ABC大酒店」；

**数字、字母与符号组合校验**

1. 最多32个可见字符
2. 所有字符均需要命中  [A-Z] [a-z] [0-9] "_~-/."

示例：A101、1234、a101、A-101

## cur_status 传入状态 id 的含义，与不同状态 id 下的字段要求

| id | 激活时是否可为此状态 | 可变更自上一状态* | 状态描述 | 此状态下必填字段 | 此状态下选填字段 | content_json示例 |
| -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| 1 | 是 | 8, 11 | 已支付 | traffic_no
planned_departure_time
planned_arrival_time
departure_city
arrival_city
wxa_path_query |  | `"{\"cur_status\":1,\"traffic_no\":\"G100\",\"planned_departure_time\":1690855200,\"planned_arrival_time\":1690869600,\"departure_city\":{\"domestic_region\":\"广州市\",\"domestic_poi\":\"ABC大酒店\",\"oversea_areas\":\"莫斯科\"},\"arrival_city\":{\"domestic_region\":\"北京市\",\"domestic_poi\":\"人民广场\",\"oversea_areas\":\"莫斯科\"},\"wxa_path_query\":\"pages/index/index\"}"` | 
| 2 | 是 | 1, 8, 11 | 出票成功 | traffic_no
planned_departure_time
planned_arrival_time
departure_city
arrival_city
wxa_path_query |  | `"{\"cur_status\":2,\"traffic_no\":\"G100\",\"planned_departure_time\":1690855200,\"planned_arrival_time\":1690869600,\"departure_city\":{\"domestic_region\":\"广州市\",\"domestic_poi\":\"ABC大酒店\",\"oversea_areas\":\"莫斯科\"},\"arrival_city\":{\"domestic_region\":\"北京市\",\"domestic_poi\":\"人民广场\",\"oversea_areas\":\"莫斯科\"},\"wxa_path_query\":\"pages/index/index\"}"` | 
| 3 | 否 | 1, 8, 11 | 出票失败 | wxa_path_query |  | `"{\"cur_status\":3,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 4 | 是 | 2, 8, 10, 11, 12, 13 | 待出行 | traffic_no
planned_departure_time
planned_arrival_time
departure_city
arrival_city
wxa_path_query |  | `"{\"cur_status\":4,\"traffic_no\":\"G100\",\"planned_departure_time\":1690855200,\"planned_arrival_time\":1690869600,\"departure_city\":{\"domestic_region\":\"广州市\",\"domestic_poi\":\"ABC大酒店\",\"oversea_areas\":\"莫斯科\"},\"arrival_city\":{\"domestic_region\":\"北京市\",\"domestic_poi\":\"人民广场\",\"oversea_areas\":\"莫斯科\"},\"wxa_path_query\":\"pages/index/index\"}"` | 
| 5 | 否 | 2, 4, 8, 10, 11, 12, 13 | 开始检票 | wxa_path_query |  | `"{\"cur_status\":5,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 6 | 否 | 5, 8, 10, 11, 13 | 已出发 | wxa_path_query |  | `"{\"cur_status\":6,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 7 | 否 | 6, 8, 10, 11, 13 | 已到达 | wxa_path_query |  | `"{\"cur_status\":7,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 8 | 否 | 1, 2, 4, 5, 6, 7, 15 | 退票中 | wxa_path_query |  | `"{\"cur_status\":8,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 9 | 否 | 8 | 退票成功 | wxa_path_query |  | `"{\"cur_status\":9,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 10 | 否 | 8 | 退票失败 | wxa_path_query |  | `"{\"cur_status\":10,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 11 | 否 | 1, 2, 3, 4, 5, 6, 7, 15 | 改签中 | wxa_path_query |  | `"{\"cur_status\":11,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 12 | 否 | 11 | 改签成功 | traffic_no
planned_departure_time
planned_arrival_time
departure_city
arrival_city
wxa_path_query |  | `"{\"cur_status\":12,\"traffic_no\":\"G100\",\"planned_departure_time\":1690855200,\"planned_arrival_time\":1690869600,\"departure_city\":{\"domestic_region\":\"广州市\",\"domestic_poi\":\"ABC大酒店\",\"oversea_areas\":\"莫斯科\"},\"arrival_city\":{\"domestic_region\":\"北京市\",\"domestic_poi\":\"人民广场\",\"oversea_areas\":\"莫斯科\"},\"wxa_path_query\":\"pages/index/index\"}"` | 
| 13 | 否 | 11 | 改签失败 | wxa_path_query |  | `"{\"cur_status\":13,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 14 | 否 | 1, 3 | 订单已取消 | wxa_path_query |  | `"{\"cur_status\":14,\"wxa_path_query\":\"pages/index/index\"}"` | 
| 15 | 否 | 1, 2, 4, 5, 8, 10, 11, 13 | 车次已取消 | wxa_path_query |  | `"{\"cur_status\":15,\"wxa_path_query\":\"pages/index/index\"}"` | 

**「可变更自上一状态」说明**

1. 此列中的数字表示当前状态只能由这些状态变更（激活时无此要求）
2. 需要注意的是当前状态变更为当前状态，也要求状态id在此列中：如当前为状态为1，只有当1也在此列中，才允许下一次更新时状态传入1
3. 在此列中不存在的状态id，意为结束态，后续不再可更新服务状态
