admin
2019-12-06 cd637932a970e7935b17d41568fe89c92775bccc
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -72,6 +72,7 @@
import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
import com.yeshi.fanli.vo.order.CommonOrderGoodsVO;
import com.yeshi.fanli.vo.order.CommonOrderVO;
import com.yeshi.fanli.vo.order.OrderCountVO;
import com.yeshi.fanli.vo.order.WeiQuanInfo;
import net.sf.json.JSONObject;
@@ -214,7 +215,7 @@
    */
   public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, boolean exchangeCoupon,
         Integer hongBaoState, Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList,
         AcceptData acceptData) {
         Long uid, AcceptData acceptData) {
      // 是否免单商品
      boolean freeOrder = false;
@@ -283,10 +284,11 @@
            rewardOrder = true; // 奖励成功 2.0.2 消失
         }
      } else if (hasRewardCoupon && !freeOrder && HongBaoV2.TYPE_ZIGOU == hongBaoType
            && HongBaoV2.STATE_YILINGQU == hongBaoState) {
         // 有可用的奖励券 、非免单订单 、且已到账的 、返利订单
         type = 2;
         rewardOrder = true;
            && HongBaoV2.STATE_YILINGQU == hongBaoState) { // 有可用的奖励券 、非免单订单 、且已到账的 、返利订单
         if (!userVIPInfoService.isVIP(uid)) { // 非会员可使用奖励券
            type = 2;
            rewardOrder = true;
         }
      }
      if (rewardOrder) {
@@ -494,6 +496,9 @@
               order.setVipOrder(false);
         } else
            order.setVipOrder(false);
         if(order.isVipOrder())
            order.setVipOrderDesc("订单来源:由超级会员的粉丝产生");
      }
      for (CommonOrderVO order : listOrder) {
@@ -611,7 +616,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
@@ -629,11 +634,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);
                  }
@@ -768,16 +773,16 @@
            // 奖励订单、免单 使用记录
            if (sourceType == null) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null,
                     signList, acceptData);
                     signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
                     listRecordTB, signList, acceptData);
                     listRecordTB, signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_JD) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
                     listRecordJD, signList, acceptData);
                     listRecordJD, signList, uid, acceptData);
            } else if (sourceType == Constant.SOURCE_TYPE_PDD) {
               setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType,
                     listRecordPDD, signList, acceptData);
                     listRecordPDD, signList, uid, acceptData);
            }
         }
@@ -795,6 +800,11 @@
   public Map<String, BigDecimal> countHistoryOrder(Long uid, Integer day, Integer source) {
      return commonOrderMapper.countHistoryOrder(uid, day, source);
   }
   @Override
   public OrderCountVO getOrderCount(Long uid, Integer day, Integer source) {
      return commonOrderMapper.getOrderCount(uid, day, source);
   }
   @Override
   public long countBonusOrderNumber(Long uid, Integer type, Integer day, String startTime, String endTime,