在mybatis中的mapper.xml中的sql撰写,如果我传递过来的参数要进行模糊查询,此时可以这样编写sql:

在mybatis中的mapper.xml中的sql撰写,如果我传递过来的参数要进行模糊查询,此时可以这样编写sql:

<if test="fydjcaActname!=null and fydjcaActname!=''">
      AND d.fydjca_Actname like '%' || #{fydjcaActname,jdbcType=VARCHAR}  || '%'
</if>
发布了33 篇原创文章 · 获赞 2 · 访问量 4753

猜你喜欢

转载自blog.csdn.net/qq_36778310/article/details/102473791
今日推荐