import request from '@/utils/request'

export function getAllDmUser(params) {
  /* const params = {
    page: 0,
    size: 9999,
    enabled: true
  } */
  return request({
    url: 'api/dmUser/findNotBindUser?userId=' + params,
    method: 'get'
  })
}

export function getAll(params) {
  /* const params = {
    page: 0,
    size: 9999,
    enabled: true
  } */
  return request({
    url: 'api/dmUser',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'api/dmUser',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/dmUser/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/dmUser',
    method: 'put',
    data
  })
}

export function updateUserSystem(data) {
  return request({
    url: 'api/dmUser/updateUserSystem',
    method: 'post',
    data
  })
}

export function updateUserAppMenu(data) {
  return request({
    url: 'api/dmUser/updateUserAppMenu',
    method: 'post',
    data
  })
}

export default { add, edit, del, getAll, updateUserSystem, updateUserAppMenu }
