WithdrawController.ts 1.63 KB

import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包
import { Withdraw } from "lib/src/entity/finance/entity/Withdraw";
// endregion

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

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

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

	/**
   */
	getWithdrawsByWaitUserConfirm(axios:AxiosStatic): Promise<AxiosResponse<Withdraw[]>> {
		return axios.get("withdraw/getWithdrawsByWaitUserConfirm");
	},

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

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

	PAGE_WITHDRAW : "withdraw/pageWithdraw",

	/**
   */
	updateWithdrawStateById(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<number>> {
		return axios.post("withdraw/updateWithdrawStateById", null, { params: { withdrawId } });
	},

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