package com.baiyue.lastleg.mapper; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; @Mapper public interface LastlegSourcePalletMapper { @Insert(""" INSERT INTO ll_order_source_pallet (id,customer_id,order_id,source_pallet_no,sequence_no,source_event_id,created_at) VALUES (#{id},#{customerId},#{orderId},#{palletNo},#{sequenceNo},#{eventId},CURRENT_TIMESTAMP(3)) """) int insert(@Param("id") long id, @Param("customerId") String customerId, @Param("orderId") long orderId, @Param("palletNo") String palletNo, @Param("sequenceNo") int sequenceNo, @Param("eventId") String eventId); @Select(""" SELECT source_pallet_no FROM ll_order_source_pallet WHERE customer_id=#{customerId} AND order_id=#{orderId} ORDER BY sequence_no,id """) List palletNos(@Param("customerId") String customerId, @Param("orderId") long orderId); }