陈昶聿
9 天以前 e2b0e66b92759eb6a24b0a4e24aa60e76bbdc1a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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<MchFollowupPlanItem> selectByPlanId(@Param("planId") Long planId);
 
    /**
     * 查询到期节点:计划有效、机构为丽水妇幼、待发送、到达发送时间、且不在重试等待中。
     */
    List<MchFollowupPlanItem> 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);
}