大于 | > |
小于 | < |
<select id="getUser" resultMap="User" resultType="String"> select * from User where <if test="name!=null "> name >= #{name} and </if> <if test="age!=null "> age <= #{age} and </if> <if test="time!=null "> time=#{time} </if> delect=0 </select>