Files
template-10579/docs/水票配送订单-后端提示词.md
赵忠林 eee4644d06 ```
feat(registration): 优化经销商注册流程并增加地址定位功能

- 修改导航栏标题从“邀请注册”为“注册成为会员”
- 修复重复提交问题并移除不必要的submitting状态
- 增加昵称和头像的必填验证提示
- 添加用户角色缺失时的默认角色写入机制
- 集成地图选点功能,支持经纬度获取和地址解析
- 实现微信地址导入功能,自动填充基本信息
- 增加定位权限检查和错误处理机制
- 添加.gitignore规则忽略备份文件夹src__bak
- 移除已废弃的银行卡和客户管理页面代码
- 优化表单验证规则和错误提示信息
- 实现经销商注册成功后自动跳转到“我的”页面
- 添加用户信息缓存刷新机制确保角色信息同步
```
2026-03-01 12:35:41 +08:00

42 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 水票配送订单:后端提示词(可直接发给后端)
## 1) 订单查询(配送员端)
请在 `GET /glt/glt-ticket-order/page` 支持以下筛选,并保证权限隔离:
- `riderId`:只返回该配送员的订单(必要)
- `deliveryStatus`10待配送、20配送中、30待客户确认、40已完成必要
- 排序:建议 `sendTime asc` + `createTime desc`(或给前端一个可控排序字段)
## 2) 配送流程字段(建议后端落库并回传)
订单表建议确保有以下字段(当前前端已按这些字段做流程判断/展示):
- `riderId/riderName/riderPhone`:配送员信息
- `deliveryStatus`10/20/30/40
- `sendStartTime`:配送员点击“开始配送”的时间
- `sendEndTime`:配送员点击“确认送达”的时间
- `sendEndImg`:送达拍照留档图片 URL可选/必填由后端策略决定)
- `receiveConfirmTime`:客户确认收货时间
- `receiveConfirmType`10客户手动确认、20配送照片自动确认、30超时自动确认
## 3) 状态流转与校验(强烈建议在后端做)
请在更新订单时做状态机校验,避免前端绕过流程:
- `10 -> 20`:仅允许订单属于当前配送员,且未开始/未送达
- `20 -> 30`:配送员确认送达(可带 `sendEndImg`
- `20/30 -> 40`:完成;来源可能是
- 客户手动确认(写 `receiveConfirmTime` + `receiveConfirmType=10`
- 配送照片直接完成(写 `receiveConfirmTime` + `receiveConfirmType=20`,并要求 `sendEndImg`
- 超时自动确认(写 `receiveConfirmTime` + `receiveConfirmType=30`,建议由定时任务执行)
## 4) 建议新增/明确的接口能力
为了避免并发抢单/越权更新,建议新增更语义化的接口(或在 update 内做等价校验):
- 接单(抢单/派单):`POST /glt/glt-ticket-order/{id}/accept`
- 后端原子校验:仅当 `riderId is null` 才能写入当前 rider 信息
- 开始配送:`POST /glt/glt-ticket-order/{id}/start`(写 `sendStartTime` + `deliveryStatus=20`
- 确认送达:`POST /glt/glt-ticket-order/{id}/delivered`(写 `sendEndTime` + `deliveryStatus=30` + 可选 `sendEndImg`
- 客户确认收货:`POST /glt/glt-ticket-order/{id}/confirm-receive`
- 校验:只能本人 `userId` 操作,且必须已送达
## 5) 为了“导航到收货地址/取货点”的字段补充(建议)
当前仅有 `address` 字符串,无法在小程序内 `openLocation` 精准导航;建议补充:
- 收货地址:`receiverName``receiverPhone``province/city/district/detail``latitude/longitude`
- 取货点(门店/仓库):`storeLatitude/storeLongitude``warehouseLatitude/warehouseLongitude`