admin
2019-09-09 61c21f17b1ad94e4b0018c7e385195bab21b0b5c
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
@@ -110,17 +110,23 @@
    */
   @RequestMapping(value = "getorder", method = RequestMethod.POST)
   public void getOrder(AcceptData acceptData, Integer page, Long uid, Integer state,
         @RequestParam("type") String type1, Integer orderState, String orderNo, String startTime, String endTime,
         Integer slotTime, boolean needCount, Integer dateType, Integer goodsType, PrintWriter out) {
         @RequestParam(name = "type",required = false) String type1, Integer orderState, String orderNo, String startTime, String endTime,
         Integer slotTime, Boolean needCount, Integer dateType, Integer goodsType, PrintWriter out) {
      Integer type = null;
      
      if (StringUtil.isNullOrEmpty(type1))
      if (StringUtil.isNullOrEmpty(type1)) {
         type = null;
      } else {
         type = Integer.parseInt(type1);
      }
      if (uid == null) {
         out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
         return;
      }
      if (needCount == null)
         needCount = false;
      if (page == null || page < 1) {
         page = 1;
@@ -141,14 +147,14 @@
         orderState = 2; // 已维权
         state = null; // 清空
      }
      if (type != null && type == 0) {
         type = null; // 所有类型订单
      }
      if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
         goodsType = Constant.SOURCE_TYPE_TAOBAO;
      } else if (goodsType != null && goodsType == 0) {
      } else if (goodsType != null && goodsType == 0){
         goodsType = null; // 所有平台订单
      }
@@ -175,8 +181,8 @@
         BigDecimal todayMoney = null;
         // 查询列表
         List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState,
               orderNo, startTime, endTime, dateType, goodsType);
         List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState, orderNo,
               startTime, endTime, dateType, goodsType);
         if (list != null && list.size() > 0) {
            // 统计总数
@@ -187,11 +193,9 @@
         // 需要统计筛选信息 :未失效的总金额 以及订单
         if (needCount && page == 1) {
            todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime,
                  goodsType);
            todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime, goodsType);
            todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime,
                  goodsType);
            todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime, goodsType);
            // 统计有效的订单数量 、 失效订单数量 、维权订单数量
            Map<String, BigDecimal> countOrder = commonOrderService.countByUidAndOrderState(uid, type, startTime,
@@ -300,8 +304,8 @@
         Integer goodsType = null; // 版本区分
         if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            goodsType = Constant.SOURCE_TYPE_TAOBAO;
         }
         }
         /* 总订单统计 */
         Map<String, BigDecimal> countOrder = commonOrderService.countHistoryOrder(uid, null, goodsType);
         int self = 0;
@@ -386,10 +390,10 @@
         e.printStackTrace();
      }
   }
   /**
    * 统计各个平台数据
    *
    * @param acceptData
    * @param uid
    * @param goodsType
@@ -407,7 +411,7 @@
         out.print(JsonUtil.loadFalseResult(1, "平台类型缺失或不正确"));
         return;
      }
      /* 今日订单统计 */
      Map<String, BigDecimal> countToday = commonOrderService.countHistoryOrder(uid, 1, goodsType);
@@ -463,7 +467,8 @@
      data.put("yesterday", yesterdaydata);
      out.print(JsonUtil.loadTrueResult(data));
   }
   /**
    * 统计奖金
    * 
@@ -485,11 +490,11 @@
         BigDecimal sharemoney = new BigDecimal(0.00);
         Object inviteCount = 0;
         BigDecimal inviteMoney = new BigDecimal(0.00);
         Integer goodsType = null; // 版本区分
         if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
            goodsType = Constant.SOURCE_TYPE_TAOBAO;
         }
         }
         Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 2, dateType, null,
               null, goodsType);