不是吧,好像和dao没有什么关系啊,
业务处处理完返回给controller,然后@OK("json")直接传到前端,
List<Hp_subway_exit_info> subwayExitInfos = dao().query(Hp_subway_exit_info.class, Cnd.where("subwayId", "=", subwayId).and("startTime", ">=", zero).and("endTime", "<=", now).desc("startTime"));
ArrayList<Record> records = new ArrayList<>();
int inTotalNum = 0;
int outTotalNum = 0;
Record record = new Record();
for (Hp_subway_exit_info subwayExitInfo : subwayExitInfos) {
inTotalNum += subwayExitInfo.getEnter_number();
outTotalNum += subwayExitInfo.getExit_number();
}
record.put("subway_exit_number", "其他");
record.put("inTotalNum", inTotalNum);
record.put("outTotalNum", outTotalNum);
records.add(record);
return records;