feat(M08-D): 补会员与员工用户管理
This commit is contained in:
+18
-1
@@ -7,6 +7,8 @@ import type {
|
||||
CleaningTaskMember,
|
||||
BusinessStatistics,
|
||||
ManagedRoom,
|
||||
MemberCard,
|
||||
MemberDetail,
|
||||
ManagedOrder,
|
||||
ManagedStore,
|
||||
ManagedUser,
|
||||
@@ -356,7 +358,8 @@ export function listStaffUsers(
|
||||
) {
|
||||
const params = new URLSearchParams({
|
||||
page: String(input.page),
|
||||
pageSize: String(input.pageSize)
|
||||
pageSize: String(input.pageSize),
|
||||
userType: 'STAFF'
|
||||
});
|
||||
if (input.role) params.set('role', input.role);
|
||||
if (input.status) params.set('status', input.status);
|
||||
@@ -364,6 +367,20 @@ export function listStaffUsers(
|
||||
return request<{ items: ManagedUser[]; total: number }>(session, `/users?${params}`);
|
||||
}
|
||||
|
||||
export function listMembers(
|
||||
session: ApiSession,
|
||||
input: { page: number; pageSize: number; status?: UserStatus; search?: string }
|
||||
) {
|
||||
const params = new URLSearchParams({ page: String(input.page), pageSize: String(input.pageSize) });
|
||||
if (input.status) params.set('status', input.status);
|
||||
if (input.search) params.set('search', input.search);
|
||||
return request<{ items: MemberCard[]; total: number }>(session, `/members?${params}`);
|
||||
}
|
||||
|
||||
export function getMember(session: ApiSession, memberId: string) {
|
||||
return request<MemberDetail>(session, `/members/${encodeURIComponent(memberId)}`);
|
||||
}
|
||||
|
||||
export function createStaffUser(
|
||||
session: ApiSession,
|
||||
input: { nickname: string; phone: string; note?: string; roles: StaffRole[]; storeIds: string[] }
|
||||
|
||||
Reference in New Issue
Block a user