Base URL: /table-qrcode
Authentication: 所有接口需要 @Anonymous + @Auth,通过 @RequestHeader String token 进行 JWT 认证。
POST /table-qrcode/add
{
"tableNo": "A01",
"type": 0,
"storeId": 100,
"remark": "靠窗位置"
}
| Field | Type | Required | Description |
|---|---|---|---|
| tableNo | string | YES | 桌号,1-32 字符 |
| type | int | YES | 0=摊位码, 1=公用码 |
| storeId | long | CONDITIONAL | 摊位码时必填,公用码时忽略 |
| remark | string | NO | 备注 |
{
"code": 200,
"msg": "操作成功",
"data": {
"id": 1,
"tableNo": "A01",
"type": 0,
"storeId": 100,
"nightMarketId": 5,
"qrCode": "https://xxx.com/scan?type=0&storeId=100&tableId=1",
"status": 0,
"useStatus": 0,
"createTime": "2026-04-29 10:00:00"
}
}
GET /table-qrcode/list
| Parameter | Type | Required | Description |
|---|---|---|---|
| storeId | long | NO | 按摊位筛选 |
| type | int | NO | 按类型筛选 |
| status | int | NO | 按启用状态筛选 |
| useStatus | int | NO | 按使用状态筛选 |
| pageNum | int | NO | 页码,默认 1 |
| pageSize | int | NO | 每页条数,默认 10 |
{
"code": 200,
"msg": "操作成功",
"data": [
{
"id": 1,
"tableNo": "A01",
"type": 0,
"storeId": 100,
"storeName": "烧烤摊",
"nightMarketId": 5,
"status": 0,
"useStatus": 0,
"createTime": "2026-04-29 10:00:00"
}
]
}
GET /table-qrcode/{id}
同创建响应中的 data 结构,额外包含 storeName。
PUT /table-qrcode/update
{
"id": 1,
"tableNo": "A02",
"remark": "更新备注"
}
| Field | Type | Required | Description |
|---|---|---|---|
| id | long | YES | 餐桌码 ID |
| tableNo | string | NO | 桌号 |
| remark | string | NO | 备注 |
{
"code": 200,
"msg": "操作成功"
}
DELETE /table-qrcode/delete/{id}
{
"code": 200,
"msg": "操作成功"
}
PUT /table-qrcode/changeStatus
{
"id": 1,
"status": 1
}
{
"code": 200,
"msg": "操作成功"
}
GET /table-qrcode/qrcode/{id}
返回二维码图片的 Base64 编码:
{
"code": 200,
"msg": "操作成功",
"data": "data:image/png;base64,iVBORw0KGgo..."
}
GET /table-qrcode/scan
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | int | YES | 0=摊位码, 1=公用码 |
| storeId | long | CONDITIONAL | type=0 时必填 |
| tableId | long | YES | 餐桌码 ID |
返回重定向到对应的前端页面: