功能:新增下一阶段运营能力和生产部署
This commit is contained in:
@@ -966,6 +966,199 @@ export interface PageResult<T> {
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface ArtistScheduleVO {
|
||||
id: IdType
|
||||
shopId?: IdType
|
||||
artistId: IdType
|
||||
workDate: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
slotMinutes?: number
|
||||
capacity?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface ArtistScheduleRequest {
|
||||
shopId?: IdType
|
||||
artistId?: IdType
|
||||
workDate?: string
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
slotMinutes?: number
|
||||
capacity?: number
|
||||
status?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface ArtistScheduleQuery {
|
||||
artistId?: IdType
|
||||
startDate?: string
|
||||
endDate?: string
|
||||
}
|
||||
|
||||
export interface PaymentOrderVO {
|
||||
id: IdType
|
||||
payNo?: string
|
||||
orderId: IdType
|
||||
orderNo?: string
|
||||
userId?: IdType
|
||||
shopId?: IdType
|
||||
channel?: string
|
||||
status?: string
|
||||
payAmount?: number
|
||||
paidAmount?: number
|
||||
payTime?: string
|
||||
expireTime?: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface AfterSaleVO {
|
||||
id: IdType
|
||||
afterSaleNo?: string
|
||||
orderId: IdType
|
||||
orderItemId?: IdType
|
||||
userId?: IdType
|
||||
shopId?: IdType
|
||||
type?: string
|
||||
reason?: string
|
||||
refundAmount?: number
|
||||
status?: string
|
||||
auditUserId?: IdType
|
||||
auditReason?: string
|
||||
auditTime?: string
|
||||
refundOrderId?: IdType
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface AfterSaleAuditRequest {
|
||||
auditReason?: string
|
||||
}
|
||||
|
||||
export interface AfterSaleQuery {
|
||||
status?: string
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface InventoryItemVO {
|
||||
id: IdType
|
||||
shopId?: IdType
|
||||
category?: string
|
||||
itemName: string
|
||||
unit?: string
|
||||
stockQuantity?: number
|
||||
warningThreshold?: number
|
||||
warning?: boolean
|
||||
status?: number
|
||||
}
|
||||
|
||||
export interface InventoryItemRequest {
|
||||
shopId?: IdType
|
||||
category?: string
|
||||
itemName?: string
|
||||
unit?: string
|
||||
stockQuantity?: number
|
||||
warningThreshold?: number
|
||||
status?: number
|
||||
}
|
||||
|
||||
export interface InventoryAdjustRequest {
|
||||
changeType?: string
|
||||
changeQuantity?: number
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface CampaignVO {
|
||||
id: IdType
|
||||
shopId?: IdType
|
||||
title: string
|
||||
description?: string
|
||||
scene?: string
|
||||
productIds?: string
|
||||
couponIds?: string
|
||||
status?: number
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
sortOrder?: number
|
||||
}
|
||||
|
||||
export interface CampaignRequest {
|
||||
shopId?: IdType
|
||||
title?: string
|
||||
description?: string
|
||||
scene?: string
|
||||
productIds?: string
|
||||
couponIds?: string
|
||||
status?: number
|
||||
startTime?: string
|
||||
endTime?: string
|
||||
sortOrder?: number
|
||||
}
|
||||
|
||||
export interface OperationsAnalyticsVO {
|
||||
viewCount?: number
|
||||
favoriteCount?: number
|
||||
cartCount?: number
|
||||
orderCount?: number
|
||||
paidOrderCount?: number
|
||||
completedOrderCount?: number
|
||||
reviewCount?: number
|
||||
rebookCount?: number
|
||||
totalAmount?: number
|
||||
}
|
||||
|
||||
export const adminArtistScheduleApi = {
|
||||
listSchedules: (params: ArtistScheduleQuery = {}) => {
|
||||
return adminApi.get<ArtistScheduleVO[]>('/artist-schedule/list', { params }) as unknown as Promise<ArtistScheduleVO[]>
|
||||
},
|
||||
saveSchedule: (data: ArtistScheduleRequest) => {
|
||||
return adminApi.post<ArtistScheduleVO>('/artist-schedule/save', data) as unknown as Promise<ArtistScheduleVO>
|
||||
}
|
||||
}
|
||||
|
||||
export const adminPaymentApi = {
|
||||
manualConfirmOrder: (orderId: IdType, remark?: string) => {
|
||||
return adminApi.post<PaymentOrderVO>(`/payment/order/${orderId}/manual-confirm`, undefined, {
|
||||
params: { remark }
|
||||
}) as unknown as Promise<PaymentOrderVO>
|
||||
}
|
||||
}
|
||||
|
||||
export const adminAfterSaleApi = {
|
||||
listAfterSales: (params: AfterSaleQuery) => {
|
||||
return adminApi.get<PageResult<AfterSaleVO>>('/after-sale/list', { params }) as unknown as Promise<PageResult<AfterSaleVO>>
|
||||
},
|
||||
approveAfterSale: (id: IdType, data?: AfterSaleAuditRequest) => {
|
||||
return adminApi.put<AfterSaleVO>(`/after-sale/${id}/approve`, data || {}) as unknown as Promise<AfterSaleVO>
|
||||
},
|
||||
rejectAfterSale: (id: IdType, data?: AfterSaleAuditRequest) => {
|
||||
return adminApi.put<AfterSaleVO>(`/after-sale/${id}/reject`, data || {}) as unknown as Promise<AfterSaleVO>
|
||||
}
|
||||
}
|
||||
|
||||
export const adminInventoryApi = {
|
||||
listItems: (params: { page: number; size: number }) => {
|
||||
return adminApi.get<PageResult<InventoryItemVO>>('/inventory/list', { params }) as unknown as Promise<PageResult<InventoryItemVO>>
|
||||
},
|
||||
saveItem: (data: InventoryItemRequest) => {
|
||||
return adminApi.post<InventoryItemVO>('/inventory/save', data) as unknown as Promise<InventoryItemVO>
|
||||
},
|
||||
adjustStock: (id: IdType, data: InventoryAdjustRequest) => {
|
||||
return adminApi.post<InventoryItemVO>(`/inventory/${id}/adjust`, data) as unknown as Promise<InventoryItemVO>
|
||||
}
|
||||
}
|
||||
|
||||
export const adminCampaignApi = {
|
||||
listCampaigns: (params: { status?: number; page: number; size: number }) => {
|
||||
return adminApi.get<PageResult<CampaignVO>>('/campaign/list', { params }) as unknown as Promise<PageResult<CampaignVO>>
|
||||
},
|
||||
saveCampaign: (data: CampaignRequest) => {
|
||||
return adminApi.post<CampaignVO>('/campaign/save', data) as unknown as Promise<CampaignVO>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* adminUserApi groups all API calls for this page domain.
|
||||
* Call guide: pass the typed payload or identifier into the method below, and use the returned Promise in the page script.
|
||||
@@ -1199,6 +1392,12 @@ export interface OrderVO {
|
||||
actualAmount?: number
|
||||
discountAmount: number
|
||||
payAmount: number
|
||||
paidAmount?: number
|
||||
paymentStatus?: string
|
||||
paymentMethod?: string
|
||||
paymentOrderNo?: string
|
||||
payTime?: string
|
||||
refundStatus?: string
|
||||
couponName?: string
|
||||
customerName?: string
|
||||
customerPhone?: string
|
||||
@@ -1242,6 +1441,9 @@ export const adminOrderApi = {
|
||||
*/
|
||||
updateOrderStatus: (id: IdType, status: number) => {
|
||||
return adminApi.put<boolean>(`/order/update-status/${id}`, {}, { params: { status } })
|
||||
},
|
||||
manualConfirmPayment: (id: IdType, remark?: string) => {
|
||||
return adminPaymentApi.manualConfirmOrder(id, remark)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1304,6 +1506,9 @@ export const adminDashboardApi = {
|
||||
*/
|
||||
getStats: () => {
|
||||
return adminApi.get<DashboardStats>('/dashboard/stats')
|
||||
},
|
||||
getAnalytics: () => {
|
||||
return adminApi.get<OperationsAnalyticsVO>('/dashboard/analytics') as unknown as Promise<OperationsAnalyticsVO>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1340,7 +1545,7 @@ export const adminNailArtistApi = {
|
||||
* Call guide: supply the parameters below, await the returned Promise, and handle loading / error UI in the caller.
|
||||
*/
|
||||
listNailArtists: () => {
|
||||
return adminApi.get<NailArtistInfoVO[]>('/nail-artist/list')
|
||||
return adminApi.get<NailArtistInfoVO[]>('/nail-artist/list') as unknown as Promise<NailArtistInfoVO[]>
|
||||
},
|
||||
/**
|
||||
* `getNailArtistInfo` API call. Use this method from the page script to invoke the backend endpoint tied to this feature.
|
||||
|
||||
@@ -19,6 +19,7 @@ export const WEB_API_AUTH_FREE_PATHS = [
|
||||
'/nail-artist/',
|
||||
'/shop/get/',
|
||||
'/shop/trust-profile/',
|
||||
'/shop/list',
|
||||
'/shop/list/public',
|
||||
'/shop/list/simple',
|
||||
'/tag/list/all',
|
||||
|
||||
@@ -61,6 +61,85 @@ export interface CheckoutPreview {
|
||||
summaryText?: string
|
||||
}
|
||||
|
||||
export interface PaymentOrderVO {
|
||||
id: IdType
|
||||
payNo?: string
|
||||
orderId: IdType
|
||||
orderNo?: string
|
||||
userId?: IdType
|
||||
shopId?: IdType
|
||||
channel?: string
|
||||
status?: string
|
||||
payAmount?: number
|
||||
paidAmount?: number
|
||||
payTime?: string
|
||||
expireTime?: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
export interface AfterSaleApplyRequest {
|
||||
orderId: IdType
|
||||
orderItemId?: IdType
|
||||
type: string
|
||||
reason: string
|
||||
refundAmount?: number
|
||||
}
|
||||
|
||||
export interface AfterSaleVO {
|
||||
id: IdType
|
||||
afterSaleNo?: string
|
||||
orderId: IdType
|
||||
orderItemId?: IdType
|
||||
userId?: IdType
|
||||
shopId?: IdType
|
||||
type?: string
|
||||
reason?: string
|
||||
refundAmount?: number
|
||||
status?: string
|
||||
auditReason?: string
|
||||
auditTime?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface PageResult<T> {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
size: number
|
||||
}
|
||||
|
||||
export interface GrowthSummaryVO {
|
||||
userId?: IdType
|
||||
growthValue?: number
|
||||
levelName?: string
|
||||
appointmentCount?: number
|
||||
reviewCount?: number
|
||||
}
|
||||
|
||||
export const paymentApi = {
|
||||
prepareOrderPayment: async (orderId: IdType): Promise<PaymentOrderVO> => {
|
||||
return await api.post<PaymentOrderVO>(`/payment/order/${orderId}/prepare`) as unknown as PaymentOrderVO
|
||||
},
|
||||
mockSuccess: async (orderId: IdType): Promise<PaymentOrderVO> => {
|
||||
return await api.post<PaymentOrderVO>(`/payment/order/${orderId}/mock-success`) as unknown as PaymentOrderVO
|
||||
}
|
||||
}
|
||||
|
||||
export const afterSaleApi = {
|
||||
apply: async (data: AfterSaleApplyRequest): Promise<AfterSaleVO> => {
|
||||
return await api.post<AfterSaleVO>('/after-sale/apply', data) as unknown as AfterSaleVO
|
||||
},
|
||||
listMy: async (params: { page: number; size: number }): Promise<PageResult<AfterSaleVO>> => {
|
||||
return await api.get<PageResult<AfterSaleVO>>('/after-sale/my', { params }) as unknown as PageResult<AfterSaleVO>
|
||||
}
|
||||
}
|
||||
|
||||
export const growthApi = {
|
||||
getSummary: async (): Promise<GrowthSummaryVO> => {
|
||||
return await api.get<GrowthSummaryVO>('/growth/summary') as unknown as GrowthSummaryVO
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Purpose: ArtistCalendarAppointment supports order.ts by holding or executing the artist calendar appointment page or API role.
|
||||
* Usage: import, call, read, or update this interface from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
|
||||
Reference in New Issue
Block a user