首页 新闻 会员 周边 捐助

Mybatis中传递Map参数的问题

0
悬赏园豆:15 [已关闭问题] 关闭于 2016-11-30 17:18

serviceImp中

public User getProjectsByUserId(Long userId,int start,int limit) {
Map<String,Object> map=new HashMap<String,Object>();
map.put("userId",userId);
map.put("start",start);
map.put("limit",limit);
return userMapper.getProjectsByUserId(map);
}

 

mapper.xml中

<select id="getProjectsByUserId" resultMap="userResultMap" parameterType="java.util.Map">
SELECT a.*,b.* FROM luser a left join project b on a.user_id=b.user_id WHERE a.user_id = #{userId} limit #{start},#{limit}
</select>

但是得不到值,查看日志显示:未分页的Sql=SELECT a.*,b.* FROM user a left join project b on a.user_id=b.user_id WHERE a.user_id = ? limit ?,?

薄荷香茶的主页 薄荷香茶 | 初学一级 | 园豆:48
提问于:2015-07-29 15:02
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册