遇到过这样的问题,根据一些字段查数据库,数据库里运行没问题,但是到mapper.xml就是拿不到

结果我按每个条件试着查,发现其他都没问题,有一个字段作为条件查询时查询不到,

于是试着把#取值换成$取值,好了

<select id="getInventoryByThree" parameterType="com.docc.model.Inventory"
     resultType="com.docc.model.Inventory">
        select * from BUS_INVENTORY 
        where company = #{company,jdbcType=VARCHAR} 
              and reportdate = #{reportdate,jdbcType=CHAR} 
              and type = '${type}' 
    </select>

 

相关文章:

  • 2022-01-07
  • 2021-10-01
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2022-02-02
  • 2021-12-31
相关资源
相似解决方案