feat(M08-C): 补会员检索与员工概况
This commit is contained in:
@@ -37,6 +37,7 @@ import { ThirdPartyClient } from '../dist/third-party/third-party-client.js';
|
||||
import { ThirdPartyService } from '../dist/third-party/third-party-service.js';
|
||||
import { DeviceRepository } from '../dist/devices/device-repository.js';
|
||||
import { IotMessageService } from '../dist/devices/iot-message-service.js';
|
||||
import { MemberProfileService } from '../dist/wallets/member-profile-service.js';
|
||||
import {
|
||||
executeMigrationPlan,
|
||||
loadMigrationPlan,
|
||||
@@ -708,6 +709,25 @@ async function assertPricingAndReservations(pool, context) {
|
||||
assert.equal(managedAudit[0].action, 'ORDER_CREATED_ON_BEHALF');
|
||||
assert.equal(String(JSON.parse(managedAudit[0].metadata).targetUserId), customerId);
|
||||
|
||||
const scopedMembers = await new MemberProfileService(pool).listMembers({
|
||||
actor: {
|
||||
tenantId: context.tenantId,
|
||||
userId: adminId,
|
||||
access: {
|
||||
roles: ['STORE_ADMIN'],
|
||||
capabilities: ['user.read'],
|
||||
storeIds: [String(targetRows[0].storeId)]
|
||||
}
|
||||
},
|
||||
page: 1,
|
||||
pageSize: 20,
|
||||
status: 'ACTIVE',
|
||||
search: customerId
|
||||
});
|
||||
assert.equal(scopedMembers.total, 1);
|
||||
assert.equal(scopedMembers.items[0].memberId, customerId);
|
||||
assert.ok(scopedMembers.items[0].orders.orderCount >= 1);
|
||||
|
||||
const [foreignUser] = await pool.query(
|
||||
`INSERT INTO qipai_users (tenant_id, user_type, status)
|
||||
VALUES (?, 'CUSTOMER', 'ACTIVE')`,
|
||||
@@ -2000,6 +2020,7 @@ try {
|
||||
'store-scoped on-behalf booking rejection',
|
||||
'manager on-behalf booking history and audit attribution',
|
||||
'cross-tenant on-behalf target user rejection',
|
||||
'store-scoped member discovery through historical owner orders',
|
||||
'share token stored as SHA-256 only',
|
||||
'default view and door permissions',
|
||||
'renew permission denied by default',
|
||||
|
||||
Reference in New Issue
Block a user