yujian
2020-04-13 a5bc9c4e52f98032b287a42fd243c2ffcb7d58f6
fanli/src/main/java/com/yeshi/fanli/service/manger/order/HongBaoV2AddManager.java
@@ -134,20 +134,30 @@
                  switch (t) {
                  case HongBaoV2.TYPE_ZIGOU:
                     userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, state);
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
                     break;
                  case HongBaoV2.TYPE_SHARE_GOODS:
                     userOrderMsgNotificationService.orderShareStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, state);
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
                     break;
                  case HongBaoV2.TYPE_YIJI:
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, state);
                           commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
                           commonOrder.getThirdCreateTime());
                     break;
                  case HongBaoV2.TYPE_ERJI:
                     userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
                           commonOrder.getPayment(), money, goodsCount, state);
                     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());
@@ -476,7 +486,7 @@
            }
         }
         HongBaoV2 hongBao = createFanLiHongBao(commonOrder, fanliRate, mianDanMoney, vip);
         HongBaoV2 hongBao = createFanLiHongBao(commonOrder, fanliRate, mianDanMoney);
         if (hongBao == null)
            return;
         addFanLiOrShareHongBao(hongBao, commonOrder, notificationMap);
@@ -635,7 +645,8 @@
      UserInfo user = userInfoService.selectAvailableByPrimaryKey(uid);
      if (user == null)
         return null;
      boolean isVIP = userVIPInfoService.isVIP(uid);
      UserLevelEnum level = userLevelManager.getUserLevel(uid);
      HongBaoV2 child = new HongBaoV2();
      child.setParent(parent);
@@ -654,13 +665,11 @@
      }
      child.setUserInfo(user);
      child.setUrank(user.getRank());
      child.setUrank(level.getOrderRank());
      child.setVersion(2);
      child.setCreateTime(new Date());
      child.setOrderType(commonOrder.getSourceType());
      if (child.getMoney() == null)
         return null;
      if (child.getMoney().compareTo(new BigDecimal(0)) <= 0 && !isVIP)
         return null;
      return child;
   }
@@ -673,13 +682,11 @@
    *            -返利比例
    * @param mianDanMoney
    *            免单金额
    * @param isVIP-是否为VIP订单
    * @return
    * @throws HongBaoException
    * @throws UserAccountException
    */
   private HongBaoV2 createFanLiHongBao(CommonOrder commonOrder, BigDecimal fanliRate, BigDecimal mianDanMoney,
         boolean isVIP) throws HongBaoException, UserAccountException {
   private HongBaoV2 createFanLiHongBao(CommonOrder commonOrder, BigDecimal fanliRate, BigDecimal mianDanMoney) throws HongBaoException, UserAccountException {
      HongBaoV2 hongBao = new HongBaoV2();
      hongBao.setUserInfo(commonOrder.getUserInfo());
      hongBao.setCreateTime(new Date());