XML
<resultMap id="BaseResultMap" type="com.vrm.entity.VehicleInfo">
<result column="id" property="id" jdbcType="BIGINT" />
<result column="frame_no" property="frameNo" jdbcType="VARCHAR"/>
<result column="vehicle_no" property="vehicleNo" jdbcType="VARCHAR"/>
<result column="version" property="version" jdbcType="VARCHAR"/>
</resultMap>
<select id="test" resultMap="BaseResultMap">
SELECT id,frame_no ,vehicle_no ,version
FROM t_v_info
WHERE id IN
<foreach collection="vehicleIds" item="vehicleId" open="(" close=")" separator=",">
#{vehicleId}
</foreach>
</select>
DAO
@MapKey("frameNo")
Map<String,VehicleInfo> test(@Param("vehicleIds") List<Long> vehicleIds);
Entity
@Data
public class VehicleInfo implements Serializable{
private static final long serialVersionUID = 1L;
private Long id;
private String frameNo;
private String vehicleNo;
private Integer version;
}