feat(attendant): 入驻免身份证材料、城市单选、材料后补与订单池同城过滤

入驻申请只收基本信息(身份证选填、材料全可空),服务城市改为单选白名单(北京/上海/天津/西安,默认北京);新增 POST /attendant-application/mine/materials 材料后补与 PATCH /employee/me/service-area 改城市接口;订单池按陪诊师服务城市过滤(本人已接/被共享不限城市),接单与详情二次校验;appId wxapp-escort-admin 更名为 wxapp_companion。
This commit is contained in:
lik
2026-11-10 16:33:47 +08:00
parent 3086a40b4c
commit cd3b109730
14 changed files with 522 additions and 84 deletions
+4 -4
View File
@@ -368,7 +368,7 @@ test("管理端 Agent 角色以员工档案为准", async () => {
await withModel("Employee", stub, async () => {
const role = await resolveEscortAdminRole({
_id: OWNER_ID,
app: { "wxapp-escort-admin": { role: ["user"] } },
app: { "wxapp_companion": { role: ["user"] } },
});
assert.equal(role, "attendant");
@@ -383,7 +383,7 @@ test("显式管理员不依赖员工档案", async () => {
await withModel("Employee", stub, async () => {
const admin = await resolveEscortAdminRole({
_id: OWNER_ID,
app: { "wxapp-escort-admin": { role: ["admin"] } },
app: { "wxapp_companion": { role: ["admin"] } },
});
assert.equal(admin, "admin");
assert.equal(stub.calls.length, 0);
@@ -395,7 +395,7 @@ test("普通管理端账号无员工档案时拒绝", async () => {
await withModel("Employee", stub, async () => {
const outsider = await resolveEscortAdminRole({
_id: OWNER_ID,
app: { "wxapp-escort-admin": { role: ["user"] } },
app: { "wxapp_companion": { role: ["user"] } },
});
assert.equal(outsider, null);
});
@@ -406,7 +406,7 @@ test("历史管理员 role 缺失仍按管理员放行", async () => {
await withModel("Employee", stub, async () => {
const legacy = await resolveEscortAdminRole({
_id: OWNER_ID,
app: { "wxapp-escort-admin": { wxopenid: "o123" } },
app: { "wxapp_companion": { wxopenid: "o123" } },
});
assert.equal(legacy, "admin");
});