Files
qipai/docs/api-changelog/2026-06-24-M07-D-members.md

30 lines
1.1 KiB
Markdown
Raw Permalink 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.
# M07-D members
- 工程 commit`ed0d455`
- 数据库迁移:无新增迁移,复用 M02 用户、M03 订单访问、M04 订单、M07 钱包/充值/权益表。
## 新增后台 API
- `GET /admin-api/members`
- 权限:有效后台会话,具备 `user.read``tenant.manage``PLATFORM_ADMIN`
- 查询:`page``pageSize``status``search`
- 返回:会员基础信息、脱敏手机号、余额汇总、充值汇总、订单汇总、优惠券和套餐汇总。
- `GET /admin-api/members/:id`
- 权限:同会员列表。
- 返回:会员聚合档案,并额外返回最近钱包流水。
## 访问范围
- 租户管理员和平台管理员可查看租户内会员。
- 门店管理员必须具备 `user.read`,且仅能查看在其门店范围内存在钱包账户的会员。
- 无门店范围的普通员工返回空列表,详情按 `MEMBER_NOT_FOUND` 处理。
## 错误码
- `AUTH_SESSION_INVALID`:会话无效。
- `MEMBER_READ_FORBIDDEN`:缺少会员查看权限。
- `INVALID_MEMBER_REQUEST`:参数非法。
- `MEMBER_NOT_FOUND`:会员不存在或不在当前访问范围。