feat:寄卖增加对接客服,db脚本迁移修复
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { apiGet, apiPatch, apiPost, apiPut } from '@/lib/http'
|
||||
import { apiDelete, apiGet, apiPatch, apiPost, apiPut } from '@/lib/http'
|
||||
import type {
|
||||
ConsignmentContactSupporter,
|
||||
ConsignmentInventory,
|
||||
ConsignmentStatsSummary,
|
||||
ConsignmentSubmission,
|
||||
@@ -8,6 +9,43 @@ import type {
|
||||
WorkOrderInventoryMatchOptions,
|
||||
} from '@/types/consignment'
|
||||
|
||||
// --- 对接客服名单 ---
|
||||
|
||||
export function fetchAdminConsignmentContacts(params?: { keyword?: string; enabled?: string }) {
|
||||
return apiGet<{ items: ConsignmentContactSupporter[]; total: number }>(
|
||||
'/api/v1/admin/worker-platform/consignment/contacts',
|
||||
params,
|
||||
)
|
||||
}
|
||||
|
||||
export function createAdminConsignmentContact(payload: Record<string, unknown>) {
|
||||
return apiPost<ConsignmentContactSupporter>(
|
||||
'/api/v1/admin/worker-platform/consignment/contacts',
|
||||
payload,
|
||||
)
|
||||
}
|
||||
|
||||
export function updateAdminConsignmentContact(
|
||||
id: number | string,
|
||||
payload: Record<string, unknown>,
|
||||
) {
|
||||
return apiPut<ConsignmentContactSupporter>(
|
||||
`/api/v1/admin/worker-platform/consignment/contacts/${id}`,
|
||||
payload,
|
||||
)
|
||||
}
|
||||
|
||||
export function setAdminConsignmentContactEnabled(id: number | string, enabled: boolean) {
|
||||
return apiPatch<ConsignmentContactSupporter>(
|
||||
`/api/v1/admin/worker-platform/consignment/contacts/${id}/enabled`,
|
||||
{ enabled },
|
||||
)
|
||||
}
|
||||
|
||||
export function deleteAdminConsignmentContact(id: number | string) {
|
||||
return apiDelete<{ deleted: boolean }>(`/api/v1/admin/worker-platform/consignment/contacts/${id}`)
|
||||
}
|
||||
|
||||
// --- 库存管理 ---
|
||||
|
||||
export function fetchAdminConsignmentInventories(params?: Record<string, unknown>) {
|
||||
|
||||
Reference in New Issue
Block a user