import request from '@/utils/httpRequest'

export default class NotifyService {
  save (inputForm) {
    return request({
      url: `/notify/save`,
      method: 'post',
      data: inputForm
    })
  }

  delete (ids) {
    return request({
      url: '/notify/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }

  close (id) {
    return request({
      url: '/notify/close',
      method: 'delete',
      params: {id: id}
    })
  }

  queryById (id) {
    return request({
      url: `/notify/queryById`,
      method: 'get',
      params: {id: id}
    })
  }
  query (params) {
    return request({
      url: `/notify/queryById`,
      method: 'get',
      params: params
    })
  }

  list (params) {
    return request({
      url: '/notify/list',
      method: 'get',
      params: params
    })
  }

  myNotifyList (params) {
    return request({
      url: '/notify/myNotifyList',
      method: 'get',
      params: params
    })
  }
  updateStatusById (data) {
    return request({
      url: '/notify/updateStatusById',
      method: 'post',
      data: data
    })
  }
  pushNotifyRecord (id) {
    return request({
      url: '/notify/pushNotifyRecord',
      method: 'post',
      data: {id: id}
    })
  }
  saveForm (inputForm) {
    return request({
      url: `/notify/saveForm`,
      method: 'post',
      data: inputForm
    })
  }

  addComment (param) {
    return request({
      url: '/notify/addComment',
      method: 'post',
      data: param
    })
  }
  delComment (id) {
    return request({
      url: '/notify/delComment',
      method: 'get',
      params: {id: id}
    })
  }

  portionRead (ids) {
    return request({
      url: '/notify/portionRead',
      method: 'post',
      params: {ids: ids}
    })
  }

  readAll () {
    return request({
      url: '/notify/readAll',
      method: 'post'
    })
  }
}
