admin
2020-04-15 ee5c8055b1c0dd7c67a9025a76b10bd287c93d9a
fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManagerV2.java
@@ -168,51 +168,25 @@
                     break;
                  case HongBaoV2.TYPE_ERJI:
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,    commonOrder.getPayment(), money,
                           goodsCount,  commonOrder.getState(), commonOrder.getThirdCreateTime());
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
                     break;
                  case HongBaoV2.TYPE_SHARE_YIJI:
                     userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
                     break;
                  }
               }
            }
                  case HongBaoV2.TYPE_SHARE_ERJI:
            // 添加新版本通知
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
            if (!hasAdd) {
               Iterator<Integer> its = notificationMap.keySet().iterator();
               while (its.hasNext()) {
                  Integer t = its.next();
                  HongBaoV2 notify = notificationMap.get(t).getHongBaoV2();
                  CommonOrder commonOrder = notificationMap.get(t).getCommonOrder();
                  String orderId = commonOrderList.get(0).getOrderNo();
                  Long uid = notify.getUserInfo().getId();
                  BigDecimal money = notify.getMoney();
                  switch (t) {
                  case HongBaoV2.TYPE_ZIGOU:
                     userOrderMsgNotificationService.orderFanLiStateChanged(uid, orderId, orderType,
                           commonOrder.getPayment(), money, state);
                     break;
                  case HongBaoV2.TYPE_SHARE_GOODS:
                     userOrderMsgNotificationService.orderShareStateChanged(uid, orderId, orderType,
                           commonOrder.getPayment(), money, state);
                     break;
                  case HongBaoV2.TYPE_YIJI:
                     userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
                           commonOrder.getPayment(), money, state);
                     break;
                  case HongBaoV2.TYPE_ERJI:
                     userOrderMsgNotificationService.orderInviteStateChanged(uid, orderId, orderType,
                           commonOrder.getPayment(), money, state);
                     break;
                  case HongBaoV2.TYPE_SHARE_YIJI:
                     userOrderMsgNotificationService.orderShareFirstLevelStateChanged(uid, orderId, orderType,
                           commonOrder.getPayment(), money, state);
                  }
               }
            }
@@ -305,12 +279,14 @@
            tempHongBao.setMoney(hongBao.getMoney());
            CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
            tempCommonOrder.setPayment(commonOrder.getPayment());
            tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
            notificationMap.put(type, new HongBaoOrder(tempCommonOrder, tempHongBao));
         } else {
            // 增加付款金额与资金
            HongBaoOrder tempHongBaoOrder = notificationMap.get(type);
            tempHongBaoOrder.getCommonOrder()
                  .setPayment(tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
            tempHongBaoOrder.getHongBaoV2()
                  .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(hongBao.getMoney()));
            notificationMap.put(type, tempHongBaoOrder);
@@ -339,6 +315,7 @@
                  tempHongBao.setMoney(child.getMoney());
                  CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
                  tempCommonOrder.setPayment(commonOrder.getPayment());
                  tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
                  notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
               } else {
                  // 增加付款金额与资金
@@ -402,6 +379,7 @@
            tempHongBao.setMoney(hongBao.getMoney());
            CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
            tempCommonOrder.setPayment(commonOrder.getPayment());
            tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
            notificationMap.put(type, new HongBaoOrder(tempCommonOrder, tempHongBao));
         } else {
            // 增加付款金额与资金
@@ -435,6 +413,7 @@
                        .setMoney(childUpdate.getMoney() == null ? new BigDecimal(0) : childUpdate.getMoney());
                  CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
                  tempCommonOrder.setPayment(commonOrder.getPayment());
                  tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
                  notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
               } else {
                  // 增加付款金额与资金
@@ -624,6 +603,7 @@
            CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
            tempCommonOrder.setPayment(commonOrder.getPayment());
            tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
            notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
         } else {
            // 增加付款金额与资金
@@ -828,6 +808,7 @@
         tempHongBao.setMoney(hongBao.getMoney());
         CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
         tempCommonOrder.setPayment(commonOrder.getPayment());
         tempCommonOrder.setThirdCreateTime(commonOrder.getThirdCreateTime());
         notificationMap.put(hongBao.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
      } else {
         // 增加付款金额与资金