package com.template.services;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.template.model.pojo.SmartDataTask;
import com.template.model.pojo.SmartDataTaskDebug;
import com.template.model.pojo.SmartDataTaskLog;
import com.template.model.result.PageUtils;

import java.util.Map;

/**
 * <p>
 * 数据源任务 服务类
 * </p>
 *
 * @author ceshi
 * @since 2023-12-05
 */
public interface SmartDataTaskService extends IService<SmartDataTask> {
    Map<String, Object> insertSmartDataTask1(SmartDataTask smartDataTask);

    // 添加任务2-字段配置
    Map<String, Object> insertSmartDataTask2(JSONObject requestData);

    Map<String, Object> insertSmartDataTask3(SmartDataTask smartDataTask);

    Map<String, Object> updateSmartDataTaskById1(SmartDataTask smartDataTask);

    Map<String, Object> updateSmartDataTaskById2(JSONObject json);

    Map<String, Object> updateSmartDataTaskById3(SmartDataTask smartDataTask);

    PageUtils<SmartDataTask> queryPageSmartDataTasks(int currentPage, int pageCount, SmartDataTask smartDataTask);

    Map<String, Object> deleteSmartDataTaskById(int id, int delMethod);

    PageInfo<SmartDataTaskDebug> queryPageSmartDataTaskDebug(int currentPage, int pageCount, Integer eTaskId, String startTime, String endTime);

    SmartDataTask getSmartById(int id);

    Map<String, Object> createJob(SmartDataTask smartDataTask);

    Map<String, Object> pauseJob(SmartDataTask smartDataTask);

    Map<String, Object> resumeJob(SmartDataTask smartDataTask);

    Map<String, Object> updateJob(SmartDataTask smartDataTask);

    Map<String, Object> deleteJob(SmartDataTask smartDataTask);

    Map<String, Object> runOnceJob(SmartDataTask smartDataTask);

    Map<String, Object> testSql(String json);

    Map<String, Object> getDepart();

    Map<String, Object> getSyncPolicy();

    Map<String, Object> getExchangeType();

    Map<String, Object> getTables(String json);

    Map<String, Object> getViews(String json);

    Map<String, Object> deleteSmartDataTaskDebugByIds(JSONObject json);

    PageInfo<SmartDataTaskLog> queryPageSmartDataTaskLog(int currentPage, int pageCount, Integer eTaskId, String tkLogTaskName, Integer tkLogAutoManual,
                                                         Integer tkLogDsSourceId, Integer tkLogDsDestinationId,
                                                         Integer tkLogCostTime, Integer tkLogExeStatus, String startTime, String endTime);
}
