首页 > 其他 > 详细

mybatis3 多条件查询的xml写法

时间:2020-04-01 21:54:36      阅读:228      评论:0      收藏:0      [点我收藏+]
多条件查询时,用<where>

<select id="findAllSelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_user
<where>
<if test="id != null">
and id = #{id,jdbcType=BIGINT}
</if>
<if test="username != null">
and username = #{username,jdbcType=VARCHAR}
</if>
</where>
</select>

https://blog.csdn.net/thris/article/details/84810974

mybatis3 多条件查询的xml写法

原文:https://www.cnblogs.com/isme-zjh/p/12615564.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!