import request from '/@/utils/request'

/** 查询岗位列表 */
export function getList(params?: any) {
  return request({
    url: '/system/post/list',
    method: 'get',
    params,
  })
}

/** 新增岗位 */
export const doAdd = (data: any) => {
  return request({
    url: '/system/post',
    method: 'post',
    data,
  })
}

/** 修改岗位 */
export const doEdit = (data: any) => {
  return request({
    url: '/system/post',
    method: 'put',
    data,
  })
}

/** 删除岗位 */
export const doDelete = (postId: any) => {
  return request({
    url: `/system/post/${postId}`,
    method: 'delete',
  })
}

/** 查询岗位详细 */
export function getPost(postId: any) {
  return request({
    url: `/system/post/${postId}`,
    method: 'get',
  })
}
