yujian
2019-12-07 1fd8f11537bb74c1f7e611e35a766cbbd34eff05
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -213,8 +213,8 @@
    * @param list
    * @param signList
    */
   public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, boolean exchangeCoupon,
         Integer hongBaoState, Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList,
   public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon,   Integer hongBaoState,
         Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList,
         Long uid, AcceptData acceptData) {
      // 是否免单商品
@@ -261,21 +261,6 @@
      // 订单标识
      order.setSignList(signList);
      // 1.6.5 是否存在新兑换的券
      if (!hasRewardCoupon && exchangeCoupon) {
         try {
            Date thirdCreateTime = order.getThirdCreateTime();
            if (thirdCreateTime != null) {
               long downOrderTime = thirdCreateTime.getTime();
               long limitDate = TimeUtil.convertDateToTemp("2019-09-10");
               if (downOrderTime > limitDate)
                  hasRewardCoupon = true;
            }
         } catch (Exception e) {
            e.printStackTrace();
         }
      }
      boolean rewardOrder = false;
      int type = 1; // 1 常规跳转页面 2弹出选项(奖励券)
@@ -470,8 +455,7 @@
      Date august = TimeUtil.parse("2019-08-01");
      // 是否存在奖励券
      boolean hasRewardCoupon = userSystemCouponService.getIncludeNotExchange(uid);
      boolean exchangeCoupon = userSystemCouponService.getIncludeExchange(uid);
      boolean hasRewardCoupon = userSystemCouponService.getValidRebateCoupon(uid);
      // 需要查询是否为VIP的用户ID,只有邀请订单才需要查询
      List<Long> needSelectVIPUidList = new ArrayList<>();
@@ -616,7 +600,7 @@
         } else if (CommonOrder.STATE_SX == orderState) {
            orderStateContent = "未付款/已退款";
         } else if (CommonOrder.STATE_WQ == orderState) {
            orderStateContent = "已维权";
            orderStateContent = "已售后";
            if (sourceType != null && sourceType == Constant.SOURCE_TYPE_TAOBAO) {
               /* 订单维权 判断是否全部维权 */
               List<TaoBaoWeiQuanOrder> listWQ = taoBaoWeiQuanOrderMapper
@@ -634,11 +618,11 @@
               } else {
                  // 2019.8.1 返回维权信息
                  if (settleTime != null && august != null && settleTime.getTime() > august.getTime()) {
                     orderStateContent = "维权成功";
                     orderStateContent = "售后成功";
                     WeiQuanInfo weiQuanInfo = new WeiQuanInfo();
                     weiQuanInfo.setOldHongBao("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString());
                     weiQuanInfo
                           .setWqHongBao("维权:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
                           .setWqHongBao("售后:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
                     hongBao = MoneyBigDecimalUtil.sub(hongBao, weiQuanMoney);
                     order.setWeiQuanInfo(weiQuanInfo);
                  }
@@ -772,16 +756,16 @@
         } else {
            // 奖励订单、免单 使用记录
            if (sourceType == null) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null,
               setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null,
                     signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
               setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
                     listRecordTB, signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_JD) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
               setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
                     listRecordJD, signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_PDD) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
               setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType,
                     listRecordPDD, signList, uid, acceptData);
            }
         }