求大佬告诉我怎么做,用dao可以带pager,但是自己写sql语句查到的结果不知道怎么传回pager
@At("/total")
@GET
@AdaptBy(type = JsonAdaptor.class)
public Object total(@Attr("me")String userId, HttpServletRequest request) {
Sql sql = Sqls.create("SELECT b.id as userId,b.realname as realName,c.id as projectId,c.name as projectName,d.total_score as totalScore " +
"from sys_project_user a " +
"INNER JOIN sys_user b on b.id = a.u_id " +
"INNER JOIN sys_project c on c.id = a.p_id " +
"INNER JOIN sys_score d on a.u_id = d.u_id and a.p_id = d.project_id");
sql.setCallback(Sqls.callback.maps());
dao.execute(sql);
List maps = sql.getList(Map.class);
Map<String, Object> map = new HashMap<String, Object>();
map.put("maps", maps);
return map;
}