nested exception is org.apache.ibatis.binding.BindingException: Parameter 'XXX' not found

 Dao层需要写@Param注解

public interface BusinessInfoDataMapper{

    List<WaterTransportDto> selectSelective(Page<BusinessInfo> page,@Param(value = "BusinessInfo") BusinessInfo businessInfo);

}

xml中需要@Param中值.属性名

 <if test="BusinessInfo.coalplaceid != null and BusinessInfo.coalplaceid != '' ">
      and coalPlaceId = #{BusinessInfo.coalplaceid,jdbcType=VARCHAR},
 </if>

否则接不到值

猜你喜欢

转载自blog.csdn.net/hejunfei/article/details/103768164