import request from '@/utils/request'

// 查询积分记录列表
export function listUserIntegralLogs(query) {
  return request({
    url: '/his/userIntegralLogs/list',
    method: 'get',
    params: query
  })
}

// 校验用户是否存在
export function checkUser(userId) {
  return request({
    url: '/user/integral/checkUser/' + userId,
    method: 'get'
  })
}

// 增加积分
export function addIntegral(data) {
  return request({
    url: '/user/integral/add',
    method: 'post',
    data: data
  })
}

// 扣除积分
export function deductIntegral(data) {
  return request({
    url: '/user/integral/deduct',
    method: 'post',
    data: data
  })
}
