刘光辉
3 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package jnpf.dmsMapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.dmsEntity.print.DmsPrintOperationEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
@Mapper
public interface DmsPrintOperationMapper extends BaseMapper<DmsPrintOperationEntity> {
    @Insert("INSERT INTO public.dms_print_operations "
            + "(id, client_event_id, request_hash, target_count, created_at) "
            + "VALUES (#{row.id}, #{row.clientEventId}, #{row.requestHash}, #{row.targetCount}, #{row.createdAt}) "
            + "ON CONFLICT (client_event_id) DO NOTHING")
    int insertIgnore(@Param("row") DmsPrintOperationEntity row);
 
    @Select("SELECT id, client_event_id, request_hash, target_count, created_at "
            + "FROM public.dms_print_operations WHERE client_event_id = #{clientEventId}")
    DmsPrintOperationEntity selectByClientEventId(@Param("clientEventId") String clientEventId);
}