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 ?,?