package com.smartor.mapper; import com.smartor.domain.MchFollowupPlanItem; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.Date; import java.util.List; /** * 妇幼随访计划节点 Mapper。 */ @Mapper public interface MchFollowupPlanItemMapper { int insertMchFollowupPlanItem(MchFollowupPlanItem item); int updateMchFollowupPlanItem(MchFollowupPlanItem item); int updateSendResult(MchFollowupPlanItem item); MchFollowupPlanItem selectMchFollowupPlanItemById(@Param("id") Long id); List selectByPlanId(@Param("planId") Long planId); /** * 查询到期节点:计划有效、机构为丽水妇幼、待发送、到达发送时间、且不在重试等待中。 */ List selectDueItems(@Param("orgid") String orgid, @Param("now") Date now, @Param("limit") int limit); int claimItem(@Param("id") Long id, @Param("now") Date now); int cancelPendingByPlanId(@Param("planId") Long planId, @Param("now") Date now); int countPendingByPlanId(@Param("planId") Long planId); }