import { http } from '@/utils/http/axios';

/**
 * @description: 添加定时任务
 */
export function addTasks(params) {
  return http.request({
    url: '/job/save',
    method: 'post',
    params,
  });
}

/**
 * @description: 删除定时任务
 */
export function deleteTasks(params) {
  return http.request({
    url: '/job/update',
    method: 'post',
    params,
  });
}

/**
 * @description: 编辑定时任务
 */
export function editTasks(params) {
  return http.request({
    url: '/job/update',
    method: 'post',
    params,
  });
}

/**
 * @description: 任务列表
 */
export function tasksList(params) {
  return http.request({
    url: '/job/pageList',
    method: 'get',
    params,
  });
}

/**
 * @description: 定时任务详情
 */
export function tasksInfo(params) {
  return http.request({
    url: '/job/view',
    method: 'get',
    params,
  });
}
