刘光辉
14 小时以前 34981c30a78e8bbd7791131059a9210f9928b62c
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
package jnpf.limsMapper;
 
import jnpf.base.mapper.SuperMapper;
import jnpf.limsEntity.LimsMessageEventEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
@Mapper
public interface LimsMessageEventMapper extends SuperMapper<LimsMessageEventEntity> {
    @Insert("INSERT INTO lims_message_event (id, tenant_id, event_code, biz_id, remind_stage, occurrence_key, " +
            "recipient_snapshot, parameter_snapshot, status, recipient_count, sent_count, failed_count, " +
            "retry_count, created_time, last_modify_time) VALUES (#{id}, #{tenantId}, #{eventCode}, #{bizId}, " +
            "#{remindStage}, #{occurrenceKey}, #{recipientSnapshot}, #{parameterSnapshot}, #{status}, " +
            "#{recipientCount}, #{sentCount}, #{failedCount}, #{retryCount}, #{createdTime}, #{lastModifyTime}) " +
            "ON CONFLICT (tenant_id, occurrence_key) DO NOTHING")
    int insertIfAbsent(LimsMessageEventEntity entity);
 
    @Select("SELECT * FROM lims_message_event WHERE tenant_id = #{tenantId} AND occurrence_key = #{occurrenceKey} LIMIT 1")
    LimsMessageEventEntity selectByOccurrenceKey(@Param("tenantId") String tenantId,
                                                  @Param("occurrenceKey") String occurrenceKey);
 
    @Select("SELECT * FROM lims_message_event WHERE id = #{id}")
    LimsMessageEventEntity selectEvent(@Param("id") String id);
}