controller:
Map map=new HashMap();
map.put("pageIndex",tFriends_right_index*5);
map.put("pageSize",5);
map.put("intro1", intro1);
map.put("intro2", intro2);
map.put("usertype", userType);
List uidList =new ArrayList();
uidList.add(1);
map.put("uidList", uidList);
service.select(map);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mapper:
<select id="selectUserByPageForChange" parameterType="java.util.Map"
resultType="List" resultMap="userMap">SELECT *
FROM T_USER
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="intro2 != null">
AND intro2 = #{intro2}
</if>
<if test="city != null">
AND city = #{city}
</if>
<if test="uidList !=null">
AND uid NOT IN
<foreach collection="uidList" item="ulist" open="(" separator="," close=")">
#{ulist}
</foreach>
</if>
</trim>
ORDER BY upd_time DESC
<if test="pageIndex != null">
LIMIT #{pageIndex},#{pageSize}
</if>
</select>