2021
06-12
06-12
Mybatis动态SQL之IF语句详解
Mysql5.0以后,支持了动态sql语句,我们可以通过传递不同的参数得到我们想要的值.1.Mybatis?动态SQL之IF语句没有搭建环境的请点击1.1BlogMapper.java//查询博客List<Blog>queryBlogIf(Mapmap);1.2BlogMapper.xml<selectid="queryBlogIf"parameterType="map"resultType="Blog">select*frommybatis.blogwhere1=1<iftest="title!=null">andtitle=#{title}</...
继续阅读 >