package com.smartor.mapper; import com.smartor.domain.PatSpecificArchiveGenerateLog; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** * 专科档案生成日志Mapper接口。 * * @author ruoyi * @date 2026-11-11 */ @Mapper public interface PatSpecificArchiveGenerateLogMapper { /** * 按来源 + 随访子任务 + 配置查询日志。 * * @param sourceType 来源类型 * @param sourceSubId 来源随访子任务ID * @param configId 配置ID,未命中配置传0 * @return 日志记录,不存在返回 null */ PatSpecificArchiveGenerateLog selectBySourceSubAndConfig(@Param("sourceType") String sourceType, @Param("sourceSubId") Long sourceSubId, @Param("configId") Integer configId); /** * 查询来源随访子任务下是否已有成功/跳过/未匹配的结果。 * * @param sourceType 来源类型 * @param sourceSubId 来源随访子任务ID * @return 已处理条数 */ int countProcessedBySourceSub(@Param("sourceType") String sourceType, @Param("sourceSubId") Long sourceSubId); int insertPatSpecificArchiveGenerateLog(PatSpecificArchiveGenerateLog log); int updatePatSpecificArchiveGenerateLog(PatSpecificArchiveGenerateLog log); }