import request from '@/utils/request'

export function list(query) {
  return request({
    url: '/users/user/list',
    method: 'get',
    params: query
  })
}
export function myList(query) {
  return request({
    url: '/users/user/myList',
    method: 'get',
    params: query
  })
}
export function getUser(userId) {
  return request({
    url: '/users/user/' + userId,
    method: 'get'
  })
}

export function getUserList(query) {
  return request({
    url: '/users/user/getUserList',
    method: 'get',
    params: query
  })
}
export function getFsUserList(query) {
  return request({
    url: '/users/user/getUserListLimit',
    method: 'get',
    params: query
  })
}
// 新增用户
export function addUser(data) {
  return request({
    url: '/users/user',
    method: 'post',
    data: data
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/users/user',
    method: 'put',
    data: data
  })
}

// 列出当前公司的客户
export function listUser(data) {
  return request({
    url: '/fsuser/user/list',
    method: 'get',
    params: data
  })
}

// 转移客户
export function transferUser(data) {
  return request({
    url: '/fsuser/user/transfer',
    method: 'post',
    data: data
  })
}

