三个新列表接口,统一返回 { records, total, page, size } 格式。
Endpoint: GET /system/userOrder/orderList
Auth: 用户 token (Header)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | int | 是 | 页码,从1开始 |
| size | int | 是 | 每页条数 |
| tab | String | 是 | unpaid / active / completed / cancelled / refund |
| type | String | 否 | 0外送 / 1自取 / 2堂食,不传查所有 |
| tab | 条件 |
|---|---|
| unpaid | payStatus=0 AND type=0 |
| active | state IN (0,1,2) AND afterSaleStatus=0 AND (payStatus=1 OR type IN (1,2)) |
| completed | state=3 AND afterSaleStatus=0 |
| cancelled | state=4 AND afterSaleStatus=0 |
| refund | afterSaleStatus > 0 |
{
"code": 200,
"msg": "操作成功",
"data": {
"records": [{ /* PosOrder 全字段 + shanghu + store + shaddress + user + food + parentRemarks */ }],
"total": 100,
"page": 1,
"size": 10
}
}
Endpoint: GET /system/orderShOprate/orderList
Auth: 商家 token (Header)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | int | 是 | 页码 |
| size | int | 是 | 每页条数 |
| tab | String | 是 | pending / preparing / ready / completed / cancelled / refund |
| mdId | String | 是 | 门店ID |
| type | String | 否 | 订单类型筛选 |
| tab | 条件 |
|---|---|
| pending | state=0 AND (payStatus=1 OR type IN (1,2)) AND mdId=? |
| preparing | state=1 AND mdId=? |
| ready | state=2 AND afterSaleStatus=0 AND mdId=? |
| completed | state=3 AND afterSaleStatus=0 AND mdId=? |
| cancelled | state=4 AND afterSaleStatus=0 AND mdId=? |
| refund | afterSaleStatus > 0 AND mdId=? |
Endpoint: GET /system/orderQsOprate/orderList
Auth: 骑手 token (Header,JwtUtil.getusid 即 qsId)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | int | 是 | 页码 |
| size | int | 是 | 每页条数 |
| tab | String | 是 | newTask / toPickup / delivering / completed / cancelled / refund |
| longitude | BigDecimal | 条件必填 | newTask Tab 必填 |
| latitude | BigDecimal | 条件必填 | newTask Tab 必填 |
| tab | 条件 | 排序 |
|---|---|---|
| newTask | type=0 AND deliveryStatus=0 AND state=2 AND afterSaleStatus=0 |
距离 ASC |
| toPickup | deliveryStatus=1 AND qsId=当前骑手 AND afterSaleStatus=0 |
时间 ASC |
| delivering | deliveryStatus=2 AND qsId=当前骑手 AND afterSaleStatus=0 |
时间 ASC |
| completed | state=3 AND afterSaleStatus=0 AND qsId=当前骑手 |
时间 DESC |
| cancelled | state=4 AND qsId=当前骑手 AND afterSaleStatus=0 |
时间 DESC |
| refund | afterSaleStatus > 0 AND qsId=当前骑手 |
时间 DESC |
Endpoint: 现有 PosOrderShOprateController 接单方法
变更: state 从 0 改为 1
Endpoint: 现有 dispatchOrder()
变更:
state 从 1 改为 2deliveryStatus=0state=2Endpoint: 新增方法
变更: state 从 2 改为 3,payStatus 从 0 改为 1
变更: 校验 type=0 AND afterSaleStatus=0,设置 deliveryStatus=1
变更: 校验 type=0 AND afterSaleStatus=0,设置 deliveryStatus=2
变更: 设置 deliveryStatus=3,同时设置 state=3
Endpoint: 现有 UserOrderController.createOrder()
变更:
state=0、afterSaleStatus=0、deliveryStatus=NULLpayStatus=1payStatus=0payStatus=0