feat(worker-platform): 商品名按来源追加可配置后缀

- 新增来源后缀配置(来源下拉、启停、备注,同一时间仅启用一个)
- 管理端列表/详情与打手端列表/详情/大厅展示「商品名(后缀)」
- 打手端 DTO 透出 sourceProvider,仅展示,不改写商品名
- 新增来源选项接口与前后端单测
This commit is contained in:
2026-11-02 14:25:53 +08:00
parent 86b5347e40
commit 13869d345f
22 changed files with 1008 additions and 49 deletions
@@ -29,6 +29,7 @@ import type {
WorkerPlatformNotificationConfig,
WorkerProductMatchConfig,
WorkerAnnouncementConfig,
WorkerProductNameSuffixConfig,
WorkerLevel,
WorkerListResponse,
WorkerUserListResponse,
@@ -109,6 +110,22 @@ export function saveAdminWorkerAnnouncement(payload: WorkerAnnouncementConfig) {
return apiPost<WorkerAnnouncementConfig>('/api/v1/admin/worker-platform/announcement', payload)
}
export function fetchAdminWorkerProductNameSuffix() {
return apiGet<WorkerProductNameSuffixConfig>('/api/v1/admin/worker-platform/product-name-suffix')
}
/** 来源下拉选项:来自工单资料里的 source.provider */
export function fetchAdminWorkerProductNameSuffixSources() {
return apiGet<{ items: string[] }>('/api/v1/admin/worker-platform/product-name-suffix/sources')
}
export function saveAdminWorkerProductNameSuffix(payload: WorkerProductNameSuffixConfig) {
return apiPost<WorkerProductNameSuffixConfig>(
'/api/v1/admin/worker-platform/product-name-suffix',
payload,
)
}
export function fetchAdminWorkerCancelRequests(
status: 'pending' | 'approved' | 'rejected' = 'pending',
) {
+7
View File
@@ -11,6 +11,8 @@ import type {
WorkerCancelRequest,
WorkerCancelRequestRisk,
WorkerAnnouncementConfig,
WorkerProductNameSuffixConfig,
WorkerProductNameSuffixDisplayConfig,
WorkerAcceptanceConfig,
WorkerAcceptanceVideo,
WorkerOrderFeedback,
@@ -152,6 +154,11 @@ export function fetchWorkerAnnouncement() {
return apiGet<WorkerAnnouncementConfig>('/api/v1/worker/announcement')
}
/** 商品名来源后缀映射(后台「杂项配置」维护,只返回已启用项),打手端列表/详情/大厅展示用。 */
export function fetchWorkerProductNameSuffix() {
return apiGet<WorkerProductNameSuffixDisplayConfig>('/api/v1/worker/product-name-suffix')
}
/** 验收视频配置(后台可改):时长上限、目标高度、码率等,压缩前读取。 */
export function fetchWorkerAcceptanceConfig() {
return apiGet<WorkerAcceptanceConfig>('/api/v1/worker/acceptance/config')