gaoluyang
2026-06-24 bfdc0e0e6d5e47aa501f9b6fadd143d9c97cf00a
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
import type { PageParam, PageResult } from '../../../packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace PayAppApi {
  /** 支付应用信息 */
  export interface App {
    id?: number;
    appKey: string;
    name: string;
    status: number;
    remark: string;
    payNotifyUrl: string;
    refundNotifyUrl: string;
    transferNotifyUrl: string;
    merchantId: number;
    merchantName: string;
    createTime?: Date;
    channelCodes?: string[];
  }
 
  /** 更新状态请求 */
  export interface AppUpdateStatusReqVO {
    id: number;
    status: number;
  }
}
 
/** 查询支付应用列表 */
export function getAppPage(params: PageParam) {
  return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
    params,
  });
}
 
/** 查询支付应用详情 */
export function getApp(id: number) {
  return requestClient.get<PayAppApi.App>(`/pay/app/get?id=${id}`);
}
 
/** 新增支付应用 */
export function createApp(data: PayAppApi.App) {
  return requestClient.post('/pay/app/create', data);
}
 
/** 修改支付应用 */
export function updateApp(data: PayAppApi.App) {
  return requestClient.put('/pay/app/update', data);
}
 
/** 修改支付应用状态 */
export function updateAppStatus(data: PayAppApi.AppUpdateStatusReqVO) {
  return requestClient.put('/pay/app/update-status', data);
}
 
/** 删除支付应用 */
export function deleteApp(id: number) {
  return requestClient.delete(`/pay/app/delete?id=${id}`);
}
 
/** 获取支付应用列表 */
export function getAppList() {
  return requestClient.get<PayAppApi.App[]>('/pay/app/list');
}