package com.zg.project.wisdom.mapper;

import com.zg.project.wisdom.domain.AgvTaskResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AgvTaskResultMapper {

    AgvTaskResult selectAgvTaskResultById(Long id);

    List<AgvTaskResult> selectAgvTaskResultList(AgvTaskResult agvTaskResult);

    int insertAgvTaskResult(AgvTaskResult agvTaskResult);

    int updateAgvTaskResult(AgvTaskResult agvTaskResult);

    int deleteAgvTaskResultById(Long id);

    int deleteAgvTaskResultByIds(Long[] ids);

    /**
     * 根据requestId查询任务结果
     *
     * @param requestId
     * @return
     */
    AgvTaskResult selectByRequestId(String requestId);

    /**
     * 统计指定 requestId + status 的记录数量
     */
    int countByRequestIdAndStatus(@Param("requestId") String requestId,
                                  @Param("status") String status);

    AgvTaskResult selectByTaskNo(String taskNo);
}
