yujian
2019-07-31 f4548a3ee46afe45da4ee2a42dc169c575deee9f
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -269,6 +269,8 @@
                  e.printStackTrace();
               }
               commonGoodsVO.setGoodsType(sourceType2);
               String picture = commonGoodsVO.getPicture();
               if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
                  commonGoodsVO.setPicture(TbImgUtil.getTBSize320Img(picture));
@@ -296,9 +298,7 @@
               }
               // 实付款
               commonGoodsVO.setActualPay("付款金额:¥" + totalSettlement);
               listOrderGoods.add(commonGoodsVO);
               Integer orderType = order.getOrderType();
               if (orderType == null) {
                  String shopType = commonGoodsVO.getShopType();
@@ -307,14 +307,8 @@
                  } else if (CommonOrderGoodsVO.TYPE_TMALL.equalsIgnoreCase(shopType)) {
                     order.setOrderType(2);
                  } 
                  if (Constant.SOURCE_TYPE_JD == sourceType2) {
                     order.setOrderType(3);
                  } else if (Constant.SOURCE_TYPE_PDD == sourceType2) {
                     order.setOrderType(4);
                  }
               }
               listOrderGoods.add(commonGoodsVO);
               break;
            }
         }
@@ -338,6 +332,18 @@
         Date settleTime = order.getSettleTime();
         if (settleTime != null) {
            order.setReceiveTime("收货时间:" + format.format(settleTime));
         }
         Integer sourceType2 = order.getSourceType();
         if (sourceType2 == Constant.SOURCE_TYPE_TAOBAO) {
            Integer orderType = order.getOrderType();
            if (orderType == null) {
                order.setOrderType(1);
            }
         } else if (sourceType2 == Constant.SOURCE_TYPE_JD) {
             order.setOrderType(3);
         }  else if (sourceType2 == Constant.SOURCE_TYPE_PDD) {
             order.setOrderType(4);
         }
         /* 订单状态 转换处理 */
@@ -508,8 +514,12 @@
            }
         }
         
         // 邀请隐藏订单号
          if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
         // 邀请 隐藏订单号
         if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) {
             String orderNo = order.getOrderNo();
             orderNo = orderNo.substring(0, orderNo.length()-6);
             order.setOrderNo(orderNo + "******");
         } else if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
               || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType
               || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) {
             String orderNo = order.getOrderNo();
@@ -851,9 +861,9 @@
               commonOrder.getTradeId(), new Date(), commonOrder.getSourceType()));
         return commonOrder;
      } else {// 修改
         // 已经结算或者已经失效的订单不处理
         if (oldCommonOrder.getState() == CommonOrder.STATE_JS
               || oldCommonOrder.getState() == CommonOrder.STATE_SX) {
         // 已经结算,已经失效,状态未改变的订单不处理
         if (oldCommonOrder.getState() == CommonOrder.STATE_JS || oldCommonOrder.getState() == CommonOrder.STATE_SX
               || (oldCommonOrder.getState().intValue() == commonOrder.getState())) {
            return oldCommonOrder;
         }
         // 交易ID一致才修改
@@ -1151,10 +1161,14 @@
   @Override
   public CommonOrderVO getCommonOrderByOrderNo(Long uid, String orderNo, Integer orderState)
   public CommonOrderVO getCommonOrderByOrderNo(Long uid, String orderNo, Integer orderState, Integer sourceType)
         throws CommonOrderException {
      CommonOrderVO commonOrderVO = commonOrderMapper.getCommonOrderByOrderNo(uid, orderNo, orderState);
      if (sourceType == null) {
         sourceType = Constant.SOURCE_TYPE_TAOBAO;
      }
      CommonOrderVO commonOrderVO = commonOrderMapper.getCommonOrderByOrderNo(uid, orderNo, orderState, sourceType);
      // 订单信息为空
      if (commonOrderVO == null) {
         return null;
@@ -1179,13 +1193,13 @@
         }
         String orderNo1 = commonOrder.getOrderNo();
         Integer sourceType = commonOrder.getSourceType();
         Integer sourceType1 = commonOrder.getSourceType();
         String orderNo2 = commonOrderVO.getOrderNo();
         Integer sourceType2 = commonOrderVO.getSourceType();
         // 来源、订单号相同
         if (sourceType.equals(sourceType2) && orderNo1.equals(orderNo2)) {
         if (sourceType1.equals(sourceType2) && orderNo1.equals(orderNo2)) {
            // 加入商品信息
            List<CommonOrderGoodsVO> listOrderGoods = commonOrderVO.getListOrderGoods();