import request from '@/utils/request'

export function getDmSystem(params) {
  return request({
    url: 'api/dmSystem',
    method: 'get',
    params
  })
}

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

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

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

export function queryByUserId(userId) {
  return request({
    url: 'api/dmSystem/queryByUserId?userId=' + userId,
    method: 'get'
  })
}

export default { add, edit, del, getDmSystem, queryByUserId }
