mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 19:35:07 +08:00
52
src/api/mall/statistics/product.ts
Normal file
52
src/api/mall/statistics/product.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/config/axios'
|
||||
import { DataComparisonRespVO } from '@/api/mall/statistics/common'
|
||||
|
||||
export interface ProductStatisticsVO {
|
||||
id: number
|
||||
day: string
|
||||
spuId: number
|
||||
spuName: string
|
||||
spuPicUrl: string
|
||||
browseCount: number
|
||||
browseUserCount: number
|
||||
favoriteCount: number
|
||||
cartCount: number
|
||||
orderCount: number
|
||||
orderPayCount: number
|
||||
orderPayPrice: number
|
||||
afterSaleCount: number
|
||||
afterSaleRefundPrice: number
|
||||
browseConvertPercent: number
|
||||
}
|
||||
|
||||
// 商品统计 API
|
||||
export const ProductStatisticsApi = {
|
||||
// 获得商品统计分析
|
||||
getProductStatisticsAnalyse: (params: any) => {
|
||||
return request.get<DataComparisonRespVO<ProductStatisticsVO>>({
|
||||
url: '/statistics/product/analyse',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 获得商品状况明细
|
||||
getProductStatisticsList: (params: any) => {
|
||||
return request.get<ProductStatisticsVO[]>({
|
||||
url: '/statistics/product/list',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 导出获得商品状况明细 Excel
|
||||
exportProductStatisticsExcel: (params: any) => {
|
||||
return request.download({
|
||||
url: '/statistics/product/export-excel',
|
||||
params
|
||||
})
|
||||
},
|
||||
// 获得商品排行榜分页
|
||||
getProductStatisticsRankPage: async (params: any) => {
|
||||
return await request.get({
|
||||
url: `/statistics/product/rank-page`,
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
@ -66,9 +66,9 @@ export const getTradeStatisticsSummary = () => {
|
||||
}
|
||||
|
||||
// 获得交易状况统计
|
||||
export const getTradeTrendSummary = (params: TradeTrendReqVO) => {
|
||||
export const getTradeStatisticsAnalyse = (params: TradeTrendReqVO) => {
|
||||
return request.get<DataComparisonRespVO<TradeTrendSummaryRespVO>>({
|
||||
url: '/statistics/trade/trend/summary',
|
||||
url: '/statistics/trade/analyse',
|
||||
params: formatDateParam(params)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user