import request from '@/utils/request'

const base = '/system/cron/'


export const add = (data) => request.post(base, data)

export const update = (data) => request.put(base, data)

export const list = (group = 0) => request.get(base + 'list-' + group)

export const remove = (ids) => request.delete(base + ids)

export const page = (params) => request.get(base + 'page', { params })

export const logPage = (params) => request.get(base + 'log-page', { params })

export const current = (group = 0) => request.get(base + 'current-' + group)

export const start = (cronId, taskId, paramEls) => request.post(base + "/start", request.params({ cronId, taskId, paramEls }))