chrome浏览器上面 Timing显示
CAUTION:request is not finished yet!
2 回复
基本上每个页面都是的,走Ajax请求也是的
/**
* 统计
* @param request
* @return
*/
@At("/homeCount")
@Ok("json")
@POST
@RequiresAuthentication
public Object homeCount ( HttpServletRequest request) {
Map<String,Object> map = new HashMap<>();
Cnd cnd = Cnd.NEW();
int registCount = hzzyUserService.count(cnd);
cnd = Cnd.NEW();
int orderCount = hzzyOrderService.count(cnd);
cnd = Cnd.NEW();
Sql sql = Sqls.create("SELECT\n" +
"\tSUM(orderMoney) AS orderMoney\n" +
"FROM\n" +
"\thzzy_user_order $condition");
sql.setCondition(cnd);
List<Record> records = hzzyOrderService.list(sql);
cnd = Cnd.NEW();
int authenticationCount = hzzyUserAuthenticationService.count(cnd);
int auditCount = hzzyUserAuditService.count(cnd);
int keywordCount = hzzyUserKeywordService.count(cnd);
map.put("authenticationCount",authenticationCount);
map.put("auditCount",auditCount);
map.put("keywordCount",keywordCount);
map.put("registCount",registCount);
map.put("orderMoney",records.get(0).get("ordermoney"));
map.put("orderCount",orderCount);
return Result.success("成功",map);
}
添加回复
请先登陆