feat:寄卖增加对接客服,db脚本迁移修复

This commit is contained in:
2026-10-27 13:39:48 +08:00
parent 0de0fd7b58
commit 622bd779dd
25 changed files with 1515 additions and 106 deletions
+20 -1
View File
@@ -25,7 +25,11 @@ import type {
WorkerUser,
WorkerWalletLedger,
} from '@/types/worker-platform'
import type { ConsignmentBuyerInfo, ConsignmentSellerInfo } from '@/types/consignment'
import type {
ConsignmentBuyerInfo,
ConsignmentContactSupporter,
ConsignmentSellerInfo,
} from '@/types/consignment'
import { getWorkerDeviceId } from '@/utils/worker-auth'
@@ -392,6 +396,8 @@ export type WorkerConsignmentPublishPayload = {
screenshotsJson: string[]
sellerNote?: string
depositAmountFen?: number
/** 对接客服名单 id(必填,发布时选定) */
contactSupporterId: number
}
export type WorkerConsignmentItem = {
@@ -409,6 +415,10 @@ export type WorkerConsignmentItem = {
resultInventoryId?: number | string | null
screenshotsJson: string[]
contentJson: Record<string, unknown>
contactSupporterId?: number | null
contactSupporterName?: string
contactSupporterPhone?: string
contactSupporterWechat?: string
createdAt: string
}
@@ -450,6 +460,10 @@ export type WorkerConsignmentRecord = {
brillianceCount: number
askingPriceFen: number
depositAmountFen: number
contactSupporterId?: number | null
contactSupporterName?: string
contactSupporterPhone?: string
contactSupporterWechat?: string
reviewNote: string
screenshotsJson: string[]
giftEvidenceImages?: string[]
@@ -507,6 +521,11 @@ export function publishWorkerConsignment(payload: WorkerConsignmentPublishPayloa
return apiPost<WorkerConsignmentItem>('/api/v1/worker/consignment/publish', payload)
}
/** 发布寄卖时的「对接客服」下拉(仅启用中的名单)。 */
export function fetchWorkerConsignmentContacts() {
return apiGet<{ items: ConsignmentContactSupporter[] }>('/api/v1/worker/consignment/contacts')
}
export function fetchWorkerConsignments(params: WorkerConsignmentListParams = {}) {
return apiGet<WorkerConsignmentListResponse>(
'/api/v1/worker/consignment/my-items',