import request from '@/utils/request'
// 查询服务人员列表
export function listUser(query) {
  return request({
    url: '/merchant/server/user/pageList',
    method: 'get',
    params: query
  })
}

// 查询服务人员下拉列表
export function listDownSelectUser(query) {
  return request({
    url: '/merchant/server/user/pageDownSelectList',
    method: 'get',
    params: query
  })
}

// 查询服务人员详细
export function getUser(serverId) {
  return request({
    url: '/merchant/server/user/' + serverId,
    method: 'get'
  })
}

// 新增服务人员
export function addUser(data) {
  return request({
    url: '/merchant/server/user',
    method: 'post',
    data: data
  })
}

// 修改服务人员
export function updateUser(data) {
  return request({
    url: '/merchant/server/user',
    method: 'put',
    data: data
  })
}

// 删除服务人员
export function delUser(serverId) {
  return request({
    url: '/merchant/server/user/' + serverId,
    method: 'delete'
  })
}

// 导出服务人员
export function exportUser(query) {
  return request({
    url: '/merchant/server/user/export',
    method: 'get',
    params: query
  })
}

/**
 * 根据用户ID查询服务列表
 */
export function serverGoodsList(params) {
  return request({
    url: '/admin/goods/server/serverGoodsList',
    method: 'get',
    params: params
  })
}
