import http from '@/utils/http'

export function getWxUserPageApi(query) {
  return http.post('/integral/wx-user/page', query)
}

export function getWxUserListApi(deptId) {
  return http.get(`/integral/wx-users/${deptId}`)
}

export function getWxUserSearchListApi(userName) {
  return http.get(`/integral/wx-users?userName=${userName}`)
}

export function getAllWxDeptApi() {
  return http.get('/integral/wx-dept/all-tree')
}

export function changeUserIntegralApi(body) {
  return http.put('/integral/change-user', body)
}

export function getWxUserDetailApi(userId) {
  return http.get(`/integral/wx-user/detail/${userId}`)
}

export function getIntegralDetailPageApi(body) {
  return http.post('/integral/detail/page', body)
}

export function exportIntegralDetailApi(body) {
  return http.export('/integral/detail/export', body)
}

export function getIntegralOrderPageApi(body) {
  return http.post('/integral/order/page', body)
}

export function takeIntegralOrderApi(body) {
  return http.put('/integral/order/take', body)
}

export function rollbackIntegralOrderApi(body) {
  return http.put('/integral/order/rollback-take', body)
}
