import request from '@/utils/request'

// 查询业务员列表
export function listMallSalesman(query) {
  return request({
    url: '/mall/mallSalesman/list',
    method: 'get',
    params: query
  })
}

// 查询业务员列表
export function selectList(query) {
  return request({
    url: '/mall/mallSalesman/selectList',
    method: 'get',
    params: query
  })
}

// 查询业务员详细
export function getMallSalesman(id) {
  return request({
    url: '/mall/mallSalesman/' + id,
    method: 'get'
  })
}

// 新增业务员
export function addMallSalesman(data) {
  return request({
    url: '/mall/mallSalesman',
    method: 'post',
    data: data
  })
}

// 业务员重置密码
export function resetPassword(data) {
  return request({
    url: '/mall/mallSalesman/resetPassword',
    method: 'post',
    data: data
  })
}

// 修改业务员
export function updateMallSalesman(data) {
  return request({
    url: '/mall/mallSalesman',
    method: 'put',
    data: data
  })
}

// 删除业务员
export function delMallSalesman(id) {
  return request({
    url: '/mall/mallSalesman/' + id,
    method: 'delete'
  })
}

// 导出业务员
export function exportMallSalesman(query) {
  return request({
    url: '/mall/mallSalesman/export',
    method: 'get',
    params: query
  })
}

// 查询用户列表
export function selectMemberList(query) {
  return request({
    url: '/mall/mallSalesman/selectMemberList',
    method: 'get',
    params: query
  })
}

// 查看业务员二维码
export function getSalesmanQrCode(data) {
  return request({
    url: '/mall/mallSalesman/getSalesmanQrCode',
    method: 'post',
    data: data
  })
}
