package cd.casic.ci.process.process.service.task;

import cd.casic.ci.process.dto.req.task.TaskUpdateReq;
import cd.casic.ci.process.dto.resp.task.TasksResp;
import cd.casic.ci.process.process.dataObject.task.PipTask;
import cd.casic.framework.commons.pojo.CommonResult;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface TaskService extends IService<PipTask> {
    /**
     *  查询taskType是否存在（原项目的各种worker）
     * */
    void taskTypeExist(String taskType);
    List<PipTask> getTask(PipTask pipTask);
    List<PipTask> getTaskByStageIdList(List<String> stageIdList);
    TasksResp getRespById(String taskId);

    void copyTask(String taskId);
    Boolean updateTask(@RequestBody TaskUpdateReq req);
    CommonResult<String> getLogContentByTaskId(@PathVariable String taskId);
}
