当前位置: 代码迷 >> 综合 >> nested exception is org.apache.ibatis.binding.BindingException: Parameter 'XXX' not found
  详细解决方案

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

热度:20   发布时间:2024-01-24 22:22:06.0

 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>

否则接不到值

  相关解决方案