import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取师傅列表
export function letterManagerListUser(data) {
  return request({
    url: `/letterManager/listUser?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function letterManagerListUserExport(data, name) {
  return postBlob({
    url: '/letterManager/listUser/export',
    data,
    name
  })
}

export function letterManagerImport(data) {
  return handleImport('/letterManager/import', data.formdata, data.id || '')
}

export function letterManagerAddUser(data) {
  return request({
    url: '/letterManager/addUser',
    method: 'post',
    data: data
  })
}

export function letterManagerUpdateUser(data) {
  return request({
    url: '/letterManager/updateUser',
    method: 'post',
    data: data
  })
}

export function letterManagerDetailUser(params) {
  return request({
    url: '/letterManager/detailUser',
    method: 'post',
    params: params
  })
}

export function letterManagerDelUser(params) {
  return request({
    url: '/letterManager/delUser',
    method: 'post',
    params: params
  })
}
