gaoluyang
2026-06-24 712aa51536236d43e87273e4ce45ac5691dffad8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { requestClient } from '#/api/request';
 
export namespace MpStatisticsApi {
  /** 统计查询参数 */
  export interface StatisticsGetReqVO {
    accountId: number;
    date: Date[];
  }
 
  /** 消息发送概况数据 */
  export interface StatisticsUpstreamMessageRespVO {
    refDate: string;
    msgType: string;
    msgUser: number;
    msgCount: number;
  }
 
  /** 用户增减数据 */
  export interface StatisticsUserSummaryRespVO {
    refDate: string;
    userSource: number;
    newUser: number;
    cancelUser: number;
    cumulateUser: number;
  }
 
  /** 用户累计数据 */
  export interface StatisticsUserCumulateRespVO {
    refDate: string;
    cumulateUser: number;
  }
 
  /** 接口分析数据 */
  export interface StatisticsInterfaceSummaryRespVO {
    refDate: string;
    callbackCount: number;
    failCount: number;
    totalTimeCost: number;
    maxTimeCost: number;
  }
}
 
/** 获取消息发送概况数据 */
export function getUpstreamMessage(params: MpStatisticsApi.StatisticsGetReqVO) {
  return requestClient.get<MpStatisticsApi.StatisticsUpstreamMessageRespVO[]>(
    '/mp/statistics/upstream-message',
    {
      params,
    },
  );
}
 
/** 获取用户增减数据 */
export function getUserSummary(params: MpStatisticsApi.StatisticsGetReqVO) {
  return requestClient.get<MpStatisticsApi.StatisticsUserSummaryRespVO[]>(
    '/mp/statistics/user-summary',
    {
      params,
    },
  );
}
 
/** 获取用户累计数据 */
export function getUserCumulate(params: MpStatisticsApi.StatisticsGetReqVO) {
  return requestClient.get<MpStatisticsApi.StatisticsUserCumulateRespVO[]>(
    '/mp/statistics/user-cumulate',
    {
      params,
    },
  );
}
 
/** 获取接口分析数据 */
export function getInterfaceSummary(
  params: MpStatisticsApi.StatisticsGetReqVO,
) {
  return requestClient.get<MpStatisticsApi.StatisticsInterfaceSummaryRespVO[]>(
    '/mp/statistics/interface-summary',
    {
      params,
    },
  );
}