import request from '@/utils/httpRequest'
import { BUSINESS_PATH as prefix } from "../AppPath";

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

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

	close (id) {
		return request({
			url:prefix+ '/jy/notify/close',
			method: 'get',
			params: {id: id}
		})
	}

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

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

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

	addComment (param) {
		return request({
			url:prefix+ '/jy/notify/addComment',
			method: 'post',
			data: param
		})
	}
	findComment (notifyId) {
		return request({
			url:prefix+ '/jy/notify/findComment',
			method: 'get',
			params: {notifyId:notifyId}
		})
	}

	delComment (id) {
		return request({
			url:prefix+ '/jy/notify/delComment',
			method: 'get',
			params: {id: id}
		})
	}

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

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

	saveLog(inputForm){
		return request({
			url: prefix+`/jy/notify/saveLog`,
			method: 'post',
			data: inputForm
		})
	}

	exportFile(params) {
		return request({
			url: prefix + "/jy/notify/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}

	refreshComments (id) {
		return request({
			url:prefix+ '/jy/notify/refreshComments',
			method: 'get',
			params: {id: id}
		})
	}

}
