WithdrawController.ts 1.47 KB
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs, {Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Withdraw} from "lib/src/entity/finance/entity/Withdraw";
import {Page} from "lib/src/core/page/Page";
import {Pagination} from "lib/src/core/page/Pagination";

// endregion

/**
 * 提现申请(Withdraw) PI接口
 * @since 2025-10-13 12:18:11
 */
export class WithdrawController {

    /**
     * 新增提现申请
     * @param withdraw
     * @return Withdraw
     */
    static addWithdraw(axios: AxiosStatic, withdraw: Withdraw): Promise<AxiosResponse<Withdraw>> {
        return axios.post('withdraw/addWithdraw', withdraw);
    }

    /**
     * 根据id查询提现申请
     * @param withdrawId
     * @return Withdraw
     */
    static getWithdrawById(axios: AxiosStatic, withdrawId: number): Promise<AxiosResponse<Withdraw>> {
        return axios.get('withdraw/getWithdrawById', {params: {withdrawId: withdrawId}});
    }

    /**
     */
    static getWxPayMchId(axios: AxiosStatic): Promise<AxiosResponse<string>> {
        return axios.get('withdraw/getWxPayMchId');
    }

    /**
     * 分页查询提现申请
     * @param pagination
     * @return Page
     */
    static pageWithdraw(axios: AxiosStatic, pagination: Pagination<Withdraw>): Promise<AxiosResponse<Page<Withdraw>>> {
        return axios.post('withdraw/pageWithdraw', pagination);
    }

    static PAGE_WITHDRAW = 'withdraw/pageWithdraw';

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