package com.ycwl.basic.mapper;

import com.ycwl.basic.model.pc.task.entity.TaskEntity;
import com.ycwl.basic.model.pc.task.req.TaskReqQuery;
import com.ycwl.basic.model.pc.task.resp.TaskRespVO;
import com.ycwl.basic.utils.ApiResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：longbinbin
 * @Date：2024/12/2 14:06
 * 任务列表
 */
@Mapper
public interface TaskMapper {
    List<TaskRespVO> list(TaskReqQuery taskReqQuery);

    TaskRespVO getById(Long id);

    int add(TaskEntity task);

    int deleteById(Long id);

    int update(TaskEntity task);

    int updateStatus(Long id, Integer status);
    /**
     * 用户合成的视频
     *
     * @param userId
     * @return
     */
    int countByMemberIdStauFinish(String userId);

    List<TaskRespVO> selectNotRunning();
    List<TaskEntity> selectAllNotRunning();
    List<TaskEntity> selectAllRunning();

    void assignToWorker(@Param("taskId") Long taskId, @Param("workerId") Long workerId);
    void deassign(@Param("taskId") Long taskId);

    int countTask(TaskReqQuery taskReqQuery);

    int setStart(TaskEntity taskUpdate);
    int setSuccess(TaskEntity taskUpdate);
    int setFail(TaskEntity taskUpdate);

    TaskEntity getFaceAutomaticTask(Long faceId);

    TaskEntity get(Long taskId);

    List<TaskEntity> listEntity(TaskReqQuery taskReqQuery);

    List<TaskRespVO> selectNotRunningByScenicList(String scenicOnly);
}
