import service from '@/utils/request'
// @Tags Notice
// @Summary 创建通知
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Notice true "创建通知"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /not/createNotice [post]
export const createNotice = (data) => {
  return service({
    url: '/not/createNotice',
    method: 'post',
    data
  })
}

// @Tags Notice
// @Summary 删除通知
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Notice true "删除通知"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /not/deleteNotice [delete]
export const deleteNotice = (params) => {
  return service({
    url: '/not/deleteNotice',
    method: 'delete',
    params
  })
}

// @Tags Notice
// @Summary 批量删除通知
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除通知"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /not/deleteNotice [delete]
export const deleteNoticeByIds = (params) => {
  return service({
    url: '/not/deleteNoticeByIds',
    method: 'delete',
    params
  })
}

// @Tags Notice
// @Summary 更新通知
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.Notice true "更新通知"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /not/updateNotice [put]
export const updateNotice = (data) => {
  return service({
    url: '/not/updateNotice',
    method: 'put',
    data
  })
}

// @Tags Notice
// @Summary 用id查询通知
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.Notice true "用id查询通知"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /not/findNotice [get]
export const findNotice = (params) => {
  return service({
    url: '/not/findNotice',
    method: 'get',
    params
  })
}

// @Tags Notice
// @Summary 分页获取通知列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取通知列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /not/getNoticeList [get]
export const getNoticeList = (params) => {
  return service({
    url: '/not/getNoticeList',
    method: 'get',
    params
  })
}

// @Tags Notice
// @Summary 不需要鉴权的通知接口
// @Accept application/json
// @Produce application/json
// @Param data query noticeReq.NoticeSearch true "分页获取通知列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /not/getNoticePublic [get]
export const getNoticePublic = () => {
  return service({
    url: '/not/getNoticePublic',
    method: 'get',
  })
}
