select * from myq_user
<where>
1 = 1
<if test="name != null">
and name like "%"#{name}"%"
</if>
<if test="classId != null">
and class_id = #{classId}
</if>
<if test="company != null">
and company like "%"#{company}"%"
</if>
<if test="introduce != null">
and introduce like "%"#{introduce}"%"
</if>
</where>
order by update_time limit #{start} ,#{limit}
mybatis 使用多个模糊查询
最新推荐文章于 2024-07-26 00:24:43 发布