import request from '@/config/axios'

export interface UserPointsVO {
  userId: string,
  point: number,
  operation: string
}

export interface UserBalanceVO {
  userId: string,
  balance: number,
  operation: string
}

// 获取用户积分分页
export const getUserAccountPage = async (params) => {
  return await request.get({ url: `/menduner/system/user-account/page`, params })
}

// 更新账户积分
export const updateUserPoints = async (data) => {
  return await request.put({ url: `/menduner/system/user-account/update-point`, data })
}

// 更新账户余额
export const updateUserBalance = async (data) => {
  return await request.put({ url: `/menduner/system/user-account/update-balance`, data })
}

// 获取用户账户变动记录分页
export const getUserAccountRecordPage = async (params) => {
  return await request.get({ url: `/menduner/system/user/account/record/page`, params })
}