import request from '@/utils/request'

// 查询列表公告通知
export function listNotification(query) {
  return request({
    url: '/core/notification/list',
    method: 'get',
    params: query
  })
}

// 查询详细公告通知
export function getNotification(id) {
  return request({
    url: '/core/notification/' + id,
    method: 'get'
  })
}

// 新增公告通知
export function addNotification(data) {
  return request({
    url: '/core/notification',
    method: 'post',
    data: data
  })
}

// 修改公告通知
export function updateNotification(data) {
  return request({
    url: '/core/notification',
    method: 'put',
    data: data
  })
}

// 删除公告通知
export function delNotification(id) {
  return request({
    url: '/core/notification/' + id,
    method: 'delete'
  })
}
export function roleList(query) {
  return request({
    url: '/system/role/all',
    method: 'get',
    params: {
      orgType: query
    }
  })
}
export function publishNotification(id) {
  return request({
    url: '/core/notification/publish/' + id,
    method: 'get'
  })
}


