<select id="getFreightEfclInventoryList" parameterType="long" resultMap="BaseResultMap1"> SELECT freight_efcl_inventory_id, freight_efcl_id, closing_date, sailing_date, shipping_space_total, shipping_space_remain, shipping_space_used FROM freight_efcl_inventory WHERE 1=1 AND freight_efcl_id=#{freightEfclId} AND sailing_date >= DATE(current_timestamp) ORDER BY sailing_date ASC limit 4 </select>注意:sailing_date字段類型是Date類型,系統當前時間current_timestamp時間格式帶時分秒的,所以需要將其轉換成Date類型。