import request from '@/utils/request'

// 查询公告列表
export function listMallCmsNotice(query) {
  return request({
    url: '/mall/mallCmsNotice/list',
    method: 'get',
    params: query
  })
}

// 查询公告详细
export function getMallCmsNotice(id) {
  return request({
    url: '/mall/mallCmsNotice/' + id,
    method: 'get'
  })
}

// 新增公告
export function addMallCmsNotice(data) {
  return request({
    url: '/mall/mallCmsNotice',
    method: 'post',
    data: data
  })
}

// 修改公告
export function updateMallCmsNotice(data) {
  return request({
    url: '/mall/mallCmsNotice',
    method: 'put',
    data: data
  })
}

// 删除公告
export function delMallCmsNotice(id) {
  return request({
    url: '/mall/mallCmsNotice/' + id,
    method: 'delete'
  })
}

// 导出公告
export function exportMallCmsNotice(query) {
  return request({
    url: '/mall/mallCmsNotice/export',
    method: 'get',
    params: query
  })
}