import request from '@/utils/request'

// 查询个微用户列表
export function listWxUser(query) {
  return request({
    url: '/company/wxUser/list',
    method: 'get',
    params: query
  })
}

// 查询个微用户列表
export function listAll(query) {
  return request({
    url: '/company/wxUser/listAll',
    method: 'get',
    params: query
  })
}
// 查询个微用户详细
export function getWxUser(userId) {
  return request({
    url: '/company/wxUser/' + userId,
    method: 'get'
  })
}

// 新增个微用户
export function addWxUser(data) {
  return request({
    url: '/company/wxUser',
    method: 'post',
    data: data
  })
}

// 修改个微用户
export function updateWxUser(data) {
  return request({
    url: '/company/wxUser',
    method: 'put',
    data: data
  })
}

// 删除个微用户
export function delWxUser(userId) {
  return request({
    url: '/company/wxUser/' + userId,
    method: 'delete'
  })
}

// 导出个微用户
export function exportWxUser(query) {
  return request({
    url: '/company/wxUser/export',
    method: 'get',
    params: query
  })
}

//绑定小程序id
export function bindMiniUserId(data) {
  return request({
    url: '/company/wxUser/bindMiniUserId',
    method: 'put',
    data: data
  })
}

//批量添加分组
export function addGroup(data) {
  return request({
    url: '/company/wxUser/addGroup',
    method: 'post',
    data: data
  })
}
//批量移除分组
export function delGroup(data) {
  return request({
    url: '/company/wxUser/delGroup',
    method: 'post',
    data: data
  })
}
