RechargeController.ts
1.38 KB
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
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import type {WxPayUnifiedOrderV3Result} from "lib/src/domain/WxPayUnifiedOrderV3Result";
import {Recharge} from "lib/src/entity/finance/entity/Recharge";
import {Page} from "lib/src/core/page/Page";
// endregion
/**
*/
export class RechargeController{
/**
* 充值接口 (过时接口,不再使用)
详见:https://pay.weixin.qq.com/doc/v3/merchant/4012791856
* @param recharge
* @param account
* @return WxPayUnifiedOrderV3Result.JsapiResult
*/
static addRecharge(axios:AxiosStatic, recharge: any): Promise<AxiosResponse<WxPayUnifiedOrderV3Result.JsapiResult>> {
return axios.post('recharge/addRecharge', recharge);
}
/**
*/
static pageRecharge(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Recharge>>> {
return axios.post('recharge/pageRecharge', pagination);
}
static PAGE_RECHARGE = 'recharge/pageRecharge';
/**
* 提交充值退款申请
* @param rechargeId
* @param account
* @return Recharge
* @throws FieldException
*/
static refundRecharge(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Recharge>> {
return axios.post('recharge/refundRecharge', null, {params: {rechargeId: rechargeId}});
}
// region 前端扩展代码区
// endregion
}