| | |
| | | */
|
| | | @RequestMapping(value = "getOrderCount", method = RequestMethod.POST)
|
| | | public void getOrderCount(AcceptData acceptData, Long uid, Integer type, PrintWriter out) {
|
| | | if (uid == null || type == null) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "请求参数不正确"));
|
| | | return;
|
| | | }
|
| | |
|
| | | |
| | | try {
|
| | | UserInfo user = userInfoService.selectByPKey(uid);
|
| | | if (user == null) {
|
| | |
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("userInfo", userInfo);
|
| | |
|
| | | if (type == 0) {
|
| | | OrderCountVO total = commonOrderService.getOrderCount(uid, 1, type);
|
| | | |
| | | if (type == null || type == 0) {
|
| | | OrderCountVO total = commonOrderService.getOrderCount(uid, null, type);
|
| | | data.put("total", total.getSelf() + total.getShared() + total.getInvite());
|
| | | data.put("self", total.getSelf());
|
| | | data.put("shared", total.getShared());
|