import axios from "@/utils/request";


export function filterLog(query) {
  return axios({
    url: "/spssync/basic/udiinfo/filter",
    method: "get",
    params: query
  });
}


export function deleteLog(query) {
  return axios({
    url: "/spssync/basic/udiinfo/deleteByStatus",
    method: "post",
    data: query
  });
}

export function createSchedule(query) {
  return axios({
    url: "/spssync/basic/schedule/create",
    method: "post",
    data: query
  });
}


export function findConfig(query) {
  return axios({
    url: "/system/param/syncData/config",
    method: "get",
    params: query
  });
}

export function updateConfig(query) {
  return axios({
    url: "/system/param/syncData/save",
    method: "post",
    data: query
  });
}

export function infoByStatus(query) {
  return axios({
    url: "/spssync/basic/udiinfo/infoByStatus",
    method: "post",
    data: query,
    responseType: 'blob'
  });
}


export function syncData(query) {
  return axios({
    url: "/spssync/udiinfo/syncData",
    method: "post",
    data: query
  });
}


export function syncNow(query) {
  return axios({
    url: "/spssync/download/now",
    method: "get",
    params: query
  });
}
