| | |
| | | data.put("count", count);
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get("order_list_help"));
|
| | | data.put("validMoney", validMoney);
|
| | | data.put("invalidMoney", invalidMoney);
|
| | | data.put("validMoney", "¥" + validMoney);
|
| | | data.put("invalidMoney", "¥" + invalidMoney);
|
| | | data.put("findOrderHelpUrl", orderFindUrl);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (CommonOrderException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "查询失败"));
|
| | | e.printStackTrace();
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
| | | */
|
| | | @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());
|