RechargeController.ts 1.13 KB

import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Page} from "lib/src/core/page/Page";
import {Recharge} from "lib/src/entity/finance/entity/Recharge";
import {Pagination} from "lib/src/core/page/Pagination";
import {Refund} from "lib/src/entity/finance/entity/Refund";
// endregion

   /**
   */
export class RechargeController{

   /**
   */
    static getRechargeById(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Recharge>> {
        return axios.get('recharge/getRechargeById', {params: {rechargeId: rechargeId}});
    }

   /**
   */
    static getRefundsByRechargeId(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Refund[]>> {
        return axios.get('recharge/getRefundsByRechargeId', {params: {rechargeId: rechargeId}});
    }

   /**
   */
    static pageRecharge(axios:AxiosStatic, pagination: Pagination<Recharge>): Promise<AxiosResponse<Page<Recharge>>> {
        return axios.post('recharge/pageRecharge', pagination);
    }

    static PAGE_RECHARGE = 'recharge/pageRecharge';

    // region 前端扩展代码区
    // endregion
}