mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 19:35:07 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -104,5 +104,5 @@ export const exportSpu = async (params) => {
|
||||
|
||||
// 获得商品 SPU 精简列表
|
||||
export const getSpuSimpleList = async () => {
|
||||
return request.get({ url: '/product/spu/get-simple-list' })
|
||||
return request.get({ url: '/product/spu/list-all-simple' })
|
||||
}
|
||||
|
42
src/api/mall/promotion/article/index.ts
Normal file
42
src/api/mall/promotion/article/index.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ArticleVO {
|
||||
id: number
|
||||
categoryId: number
|
||||
title: string
|
||||
author: string
|
||||
picUrl: string
|
||||
introduction: string
|
||||
browseCount: string
|
||||
sort: number
|
||||
status: number
|
||||
spuId: number
|
||||
recommendHot: boolean
|
||||
recommendBanner: boolean
|
||||
content: string
|
||||
}
|
||||
|
||||
// 查询文章管理列表
|
||||
export const getArticlePage = async (params) => {
|
||||
return await request.get({ url: `/promotion/article/page`, params })
|
||||
}
|
||||
|
||||
// 查询文章管理详情
|
||||
export const getArticle = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/article/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增文章管理
|
||||
export const createArticle = async (data: ArticleVO) => {
|
||||
return await request.post({ url: `/promotion/article/create`, data })
|
||||
}
|
||||
|
||||
// 修改文章管理
|
||||
export const updateArticle = async (data: ArticleVO) => {
|
||||
return await request.put({ url: `/promotion/article/update`, data })
|
||||
}
|
||||
|
||||
// 删除文章管理
|
||||
export const deleteArticle = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/article/delete?id=` + id })
|
||||
}
|
39
src/api/mall/promotion/articleCategory/index.ts
Normal file
39
src/api/mall/promotion/articleCategory/index.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface ArticleCategoryVO {
|
||||
id: number
|
||||
name: string
|
||||
picUrl: string
|
||||
status: number
|
||||
sort: number
|
||||
}
|
||||
|
||||
// 查询文章分类列表
|
||||
export const getArticleCategoryPage = async (params) => {
|
||||
return await request.get({ url: `/promotion/article-category/page`, params })
|
||||
}
|
||||
|
||||
// 查询文章分类精简信息列表
|
||||
export const getSimpleArticleCategoryList = async () => {
|
||||
return await request.get({ url: `/promotion/article-category/list-all-simple` })
|
||||
}
|
||||
|
||||
// 查询文章分类详情
|
||||
export const getArticleCategory = async (id: number) => {
|
||||
return await request.get({ url: `/promotion/article-category/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增文章分类
|
||||
export const createArticleCategory = async (data: ArticleCategoryVO) => {
|
||||
return await request.post({ url: `/promotion/article-category/create`, data })
|
||||
}
|
||||
|
||||
// 修改文章分类
|
||||
export const updateArticleCategory = async (data: ArticleCategoryVO) => {
|
||||
return await request.put({ url: `/promotion/article-category/update`, data })
|
||||
}
|
||||
|
||||
// 删除文章分类
|
||||
export const deleteArticleCategory = async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/article-category/delete?id=` + id })
|
||||
}
|
5
src/api/mall/statistics/common.ts
Normal file
5
src/api/mall/statistics/common.ts
Normal file
@ -0,0 +1,5 @@
|
||||
/** 数据对照 Response VO */
|
||||
export interface DataComparisonRespVO<T> {
|
||||
value: T
|
||||
reference: T
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
import dayjs from 'dayjs'
|
||||
import { TradeStatisticsComparisonRespVO } from '@/api/mall/statistics/trade'
|
||||
import { DataComparisonRespVO } from '@/api/mall/statistics/common'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
/** 会员分析 Request VO */
|
||||
@ -10,17 +10,17 @@ export interface MemberAnalyseReqVO {
|
||||
|
||||
/** 会员分析 Response VO */
|
||||
export interface MemberAnalyseRespVO {
|
||||
visitorCount: number
|
||||
visitUserCount: number
|
||||
orderUserCount: number
|
||||
payUserCount: number
|
||||
atv: number
|
||||
comparison: TradeStatisticsComparisonRespVO<MemberAnalyseComparisonRespVO>
|
||||
comparison: DataComparisonRespVO<MemberAnalyseComparisonRespVO>
|
||||
}
|
||||
|
||||
/** 会员分析对照数据 Response VO */
|
||||
export interface MemberAnalyseComparisonRespVO {
|
||||
userCount: number
|
||||
activeUserCount: number
|
||||
registerUserCount: number
|
||||
visitUserCount: number
|
||||
rechargeUserCount: number
|
||||
}
|
||||
|
||||
@ -29,8 +29,8 @@ export interface MemberAreaStatisticsRespVO {
|
||||
areaId: number
|
||||
areaName: string
|
||||
userCount: number
|
||||
orderCreateCount: number
|
||||
orderPayCount: number
|
||||
orderCreateUserCount: number
|
||||
orderPayUserCount: number
|
||||
orderPayPrice: number
|
||||
}
|
||||
|
||||
@ -54,6 +54,20 @@ export interface MemberTerminalStatisticsRespVO {
|
||||
userCount: number
|
||||
}
|
||||
|
||||
/** 会员数量统计 Response VO */
|
||||
export interface MemberCountRespVO {
|
||||
/** 用户访问量 */
|
||||
visitUserCount: string
|
||||
/** 新增用户数量 */
|
||||
createUserCount: number
|
||||
}
|
||||
|
||||
/** 会员注册数量 Response VO */
|
||||
export interface MemberRegisterCountRespVO {
|
||||
date: string
|
||||
count: number
|
||||
}
|
||||
|
||||
// 查询会员统计
|
||||
export const getMemberSummary = () => {
|
||||
return request.get<MemberSummaryRespVO>({
|
||||
@ -89,3 +103,21 @@ export const getMemberTerminalStatisticsList = () => {
|
||||
url: '/statistics/member/get-terminal-statistics-list'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得用户数量量对照
|
||||
export const getUserCountComparison = () => {
|
||||
return request.get<DataComparisonRespVO<MemberCountRespVO>>({
|
||||
url: '/statistics/member/user-count-comparison'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得会员注册数量列表
|
||||
export const getMemberRegisterCountList = (
|
||||
beginTime: dayjs.ConfigType,
|
||||
endTime: dayjs.ConfigType
|
||||
) => {
|
||||
return request.get<MemberRegisterCountRespVO[]>({
|
||||
url: '/statistics/member/register-count-list',
|
||||
params: { times: [formatDate(beginTime), formatDate(endTime)] }
|
||||
})
|
||||
}
|
||||
|
6
src/api/mall/statistics/pay.ts
Normal file
6
src/api/mall/statistics/pay.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** 获取钱包充值金额 */
|
||||
export const getWalletRechargePrice = async () => {
|
||||
return await request.get<number>({ url: `/statistics/pay/wallet-recharge-price` })
|
||||
}
|
@ -1,12 +1,7 @@
|
||||
import request from '@/config/axios'
|
||||
import dayjs from 'dayjs'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
/** 交易统计对照 Response VO */
|
||||
export interface TradeStatisticsComparisonRespVO<T> {
|
||||
value: T
|
||||
reference: T
|
||||
}
|
||||
import { DataComparisonRespVO } from '@/api/mall/statistics/common'
|
||||
|
||||
/** 交易统计 Response VO */
|
||||
export interface TradeSummaryRespVO {
|
||||
@ -24,46 +19,100 @@ export interface TradeTrendReqVO {
|
||||
/** 交易状况统计 Response VO */
|
||||
export interface TradeTrendSummaryRespVO {
|
||||
time: string
|
||||
turnover: number
|
||||
turnoverPrice: number
|
||||
orderPayPrice: number
|
||||
rechargePrice: number
|
||||
expensePrice: number
|
||||
balancePrice: number
|
||||
orderWalletPayPrice: number
|
||||
brokerageSettlementPrice: number
|
||||
orderRefundPrice: number
|
||||
}
|
||||
|
||||
/** 交易订单数量 Response VO */
|
||||
export interface TradeOrderCountRespVO {
|
||||
/** 待发货 */
|
||||
undelivered?: number
|
||||
/** 待核销 */
|
||||
pickUp?: number
|
||||
/** 退款中 */
|
||||
afterSaleApply?: number
|
||||
/** 提现待审核 */
|
||||
auditingWithdraw?: number
|
||||
}
|
||||
|
||||
/** 交易订单统计 Response VO */
|
||||
export interface TradeOrderSummaryRespVO {
|
||||
/** 支付订单商品数 */
|
||||
orderPayCount?: number
|
||||
/** 总支付金额,单位:分 */
|
||||
orderPayPrice?: number
|
||||
}
|
||||
|
||||
/** 订单量趋势统计 Response VO */
|
||||
export interface TradeOrderTrendRespVO {
|
||||
/** 日期 */
|
||||
date: string
|
||||
/** 订单数量 */
|
||||
orderPayCount: number
|
||||
/** 订单支付金额 */
|
||||
orderPayPrice: number
|
||||
}
|
||||
|
||||
// 查询交易统计
|
||||
export const getTradeStatisticsSummary = () => {
|
||||
return request.get<TradeStatisticsComparisonRespVO<TradeSummaryRespVO>>({
|
||||
return request.get<DataComparisonRespVO<TradeSummaryRespVO>>({
|
||||
url: '/statistics/trade/summary'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得交易状况统计
|
||||
export const getTradeTrendSummary = (params: TradeTrendReqVO) => {
|
||||
return request.get<TradeStatisticsComparisonRespVO<TradeTrendSummaryRespVO>>({
|
||||
return request.get<DataComparisonRespVO<TradeTrendSummaryRespVO>>({
|
||||
url: '/statistics/trade/trend/summary',
|
||||
params: formatDateParam(params)
|
||||
})
|
||||
}
|
||||
|
||||
// 获得交易状况明细
|
||||
export const getTradeTrendList = (params: TradeTrendReqVO) => {
|
||||
export const getTradeStatisticsList = (params: TradeTrendReqVO) => {
|
||||
return request.get<TradeTrendSummaryRespVO[]>({
|
||||
url: '/statistics/trade/trend/list',
|
||||
url: '/statistics/trade/list',
|
||||
params: formatDateParam(params)
|
||||
})
|
||||
}
|
||||
|
||||
// 导出交易状况明细
|
||||
export const exportTradeTrend = (params: TradeTrendReqVO) => {
|
||||
export const exportTradeStatisticsExcel = (params: TradeTrendReqVO) => {
|
||||
return request.download({
|
||||
url: '/statistics/trade/trend/export-excel',
|
||||
url: '/statistics/trade/export-excel',
|
||||
params: formatDateParam(params)
|
||||
})
|
||||
}
|
||||
|
||||
// 获得交易订单数量
|
||||
export const getOrderCount = async () => {
|
||||
return await request.get<TradeOrderCountRespVO>({ url: `/statistics/trade/order-count` })
|
||||
}
|
||||
|
||||
// 获得交易订单数量对照
|
||||
export const getOrderComparison = async () => {
|
||||
return await request.get<DataComparisonRespVO<TradeOrderSummaryRespVO>>({
|
||||
url: `/statistics/trade/order-comparison`
|
||||
})
|
||||
}
|
||||
|
||||
// 获得订单量趋势统计
|
||||
export const getOrderCountTrendComparison = (
|
||||
type: number,
|
||||
beginTime: dayjs.ConfigType,
|
||||
endTime: dayjs.ConfigType
|
||||
) => {
|
||||
return request.get<DataComparisonRespVO<TradeOrderTrendRespVO>[]>({
|
||||
url: '/statistics/trade/order-count-trend',
|
||||
params: { type, beginTime: formatDate(beginTime), endTime: formatDate(endTime) }
|
||||
})
|
||||
}
|
||||
|
||||
/** 时间参数需要格式化, 确保接口能识别 */
|
||||
const formatDateParam = (params: TradeTrendReqVO) => {
|
||||
return { times: [formatDate(params.times[0]), formatDate(params.times[1])] } as TradeTrendReqVO
|
||||
|
Reference in New Issue
Block a user