import request from '@/utils/request';

/**
 * 获取我的提现记录
 */
export function getMyWithdrawList(params: any) {
  return request.get('/shop/shop-withdraw-record/my/list', params);
}

/**
 * 获取提现统计
 */
export function getWithdrawStats() {
  return request.get('/shop/shop-withdraw-record/my/stats');
}

/**
 * 获取提现配置
 */
export function getWithdrawConfig() {
  return request.get('/shop/shop-withdraw-record/config');
}

/**
 * 申请提现
 */
export function applyWithdraw(data: any) {
  return request.post('/shop/shop-withdraw-record/apply', data);
}

/**
 * 获取提现记录列表（管理员）
 */
export function getWithdrawList(params: any) {
  return request.get('/shop/shop-withdraw-record/page', params);
}

/**
 * 审核提现申请
 */
export function auditWithdraw(id: number, data: any) {
  return request.post(`/shop/shop-withdraw-record/audit/${id}`, data);
}

/**
 * 确认打款
 */
export function confirmTransfer(id: number, data: any) {
  return request.post(`/shop/shop-withdraw-record/transfer/${id}`, data);
}
