From 0cc3b905e5945d1b4b02ee5f91a615bcfd8f08d6 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期四, 25 七月 2019 11:44:10 +0800 Subject: [PATCH] 京东兼容 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java index 2a1c737..a15ab82 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java @@ -508,8 +508,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(); @@ -833,8 +837,14 @@ commonOrder.setCommonOrderGoods(goods); } - CommonOrder oldCommonOrder = commonOrderMapper.selectByOrderNoAndOrderTypeAndOrderBy(commonOrder.getOrderNo(), - commonOrder.getSourceType(), commonOrder.getOrderBy()); + CommonOrder oldCommonOrder = null; + + if (!StringUtil.isNullOrEmpty(commonOrder.getTradeId())) + oldCommonOrder = commonOrderMapper.selectBySourceTypeAndTradeId(commonOrder.getSourceType(), + commonOrder.getTradeId()); + else + oldCommonOrder = commonOrderMapper.selectByOrderNoAndOrderTypeAndOrderBy(commonOrder.getOrderNo(), + commonOrder.getSourceType(), commonOrder.getOrderBy()); if (oldCommonOrder == null)// 鏂板 { @@ -1145,10 +1155,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; @@ -1173,13 +1187,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(); -- Gitblit v1.8.0