这里是代码
1.动态查询
<!--动态查询-->
<select id="finduserDynamic" resultType="user">
select * from user
<where>
<if test="username != null">
and username like #{
username}
</if>
<if test="score != null">
and score > #{
score}
</if>
</where>
</select>
例1
@Test
//动态查询
public void finduserDynamic