ssm框架中的mapper.xml中需要传两个值,一个是分页类对象,一个是String的用户名

mapper.java中这样定义List<Integral> getIntegralList(Page page,String userID);
我需要获取某个用户的积分充值记录
但是不知道mapper.xml中怎么去写
<select id="getIntegralList" parameterType="com.matol.entity.Page" resultMap="resultIntegral">
SELECT *
FROM INTEGRAL limit #{startPos},#{pageSize};
</select>
这里少了一个where USER_NAME=传过来的userID

用标签@Param

温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-12-01
传Map,指定名称 。。。。。。。。
第2个回答  2015-12-07
class sync{
public synchronized void methodA(){};
public synchronized void methodB(){};
... ...

}本回答被网友采纳
相似回答