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

/**
 * 提现申请(Withdraw) PI接口
 * @author gonglei
 * @since 2025-10-13 12:18:11
 */
export class WithdrawController {
	/**
	 * 修改提现申请
	 * @param approveHistory
	 * @return Withdraw
	 */
	static auditWithdraw(axios: AxiosStatic, approveHistory: any): Promise<AxiosResponse<Withdraw>> {
		return axios.post("withdraw/auditWithdraw", approveHistory);
	}

	/**
	 */
	static exportWithdraw(axios: AxiosStatic, pagination: any, config?: any): Promise<AxiosResponse<void>> {
		return axios.post("withdraw/exportWithdraw", pagination, config);
	}

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

	/**
	 */
	static getWithdrawCountByAuditState(axios: AxiosStatic): Promise<AxiosResponse<any>> {
		return axios.get("withdraw/getWithdrawCountByAuditState");
	}

	/**
	 */
	static getWithdrawsByAccountId(axios: AxiosStatic, accountId: number): Promise<AxiosResponse<Withdraw[]>> {
		return axios.get("withdraw/getWithdrawsByAccountId", { params: { accountId: accountId } });
	}

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

	static PAGE_WITHDRAW = "withdraw/pageWithdraw";

	/**
	 * 删除提现申请
	 * @param withdrawId
	 * @return int
	 */
	static removeWithdrawById(axios: AxiosStatic, withdrawId: number): Promise<AxiosResponse<number>> {
		return axios.delete("withdraw/removeWithdrawById", { params: { withdrawId: withdrawId } });
	}

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