import service from '@/utils/request'

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

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

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

// @Summary 批量删除
// @Param data body request.IdsReq true "批量删除"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /cms/adContent/deleteByIds [delete]
export const deleteAdContentByIds = (params) => {
  return service({
    url: '/cms/adContent/deleteByIds',
    method: 'delete',
    params
  })
}

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

// @Summary 根据id获取
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body api.GetById true "根据id获取"
// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /cms/adContent/get [get]
export const getAdContentById = (params) => {
  return service({
    url: '/cms/adContent/get',
    method: 'get',
    params
  })
}
