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 { @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); }