import service from '@/utils/request'

// @Summary 获取列表
// @Produce  application/json
// @Router /cms/academician/getList [post]
export const getAcademicianList = (data) => {
  return service({
    url: '/cms/academician/getList',
    method: 'post',
    data
  })
}

// @Summary 新增
// @Produce  application/json
// @Param Object
// @Router /cms/academician/add [post]
export const addAcademician = (data) => {
  return service({
    url: '/cms/academician/add',
    method: 'post',
    data
  })
}

// @Summary 删除
// @Produce  application/json
// @Param ID int
// @Router /cms/academician/delete [delete]
export const deleteAcademician = (data) => {
  return service({
    url: '/cms/academician/delete',
    method: 'delete',
    data
  })
}

// @Summary 批量删除
// @Param data body request.IdsReq true "批量删除"
// @Router /cms/academician/deleteByIds [delete]
export const deleteAcademicianByIds = (params) => {
  return service({
    url: '/cms/academician/deleteByIds',
    method: 'delete',
    params
  })
}

// @Summary 修改
// @Produce  application/json
// @Param Object
// @Router /cms/academician/update [put]
export const updateAcademician = (data) => {
  return service({
    url: '/cms/academician/update',
    method: 'put',
    data
  })
}

// @Summary 根据id获取
// @Param data body api.GetById true "根据id获取"
// @Router /cms/academician/get [get]
export const getAcademicianById = (params) => {
  return service({
    url: '/cms/academician/get',
    method: 'get',
    params
  })
}

// @Summary 修改
// @Produce  application/json
// @Param Object
// @Router /cms/academician/setRel [put]
export const setAcademicianRel = (data) => {
  return service({
    url: '/cms/academician/setRel',
    method: 'put',
    data
  })
}
