|
@@ -865,6 +865,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -865,6 +865,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
865
|
}
|
865
|
}
|
866
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
866
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
867
|
BuyerOrderResp result = new BuyerOrderResp();
|
867
|
BuyerOrderResp result = new BuyerOrderResp();
|
|
|
868
|
+ result.setReceiveTitle("买家地址");
|
|
|
869
|
+ result.setPlatformWaybillTitle("发货信息");
|
868
|
result.setReceiveName(metaValue.getString("consignee"));
|
870
|
result.setReceiveName(metaValue.getString("consignee"));
|
869
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
871
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
870
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
872
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
|
@@ -878,14 +880,39 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -878,14 +880,39 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
878
|
|
880
|
|
879
|
return result;
|
881
|
return result;
|
880
|
}
|
882
|
}
|
|
|
883
|
+
|
|
|
884
|
+ public BuyerOrderResp getSendBackInfoByOrderCode(BuyerOrderReq req){
|
|
|
885
|
+ LOGGER.info("getSendBackInfoByOrderCode enter ,req is {}", req);
|
|
|
886
|
+ BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(req.getOrderCode());
|
|
|
887
|
+ if(null == buyerOrder) {
|
|
|
888
|
+ LOGGER.warn("getSendBackInfoByOrderCode return buyerOrder is null ,req is {}", req);
|
|
|
889
|
+ return null;
|
|
|
890
|
+ }
|
|
|
891
|
+
|
|
|
892
|
+ //查询buyer_order_goods
|
|
|
893
|
+ List<BuyerOrderGoods> goodsList = buyerOrderGoodsMapper.selectByOrderCode(Lists.newArrayList(buyerOrder.getOrderCode()));
|
|
|
894
|
+ if(CollectionUtils.isEmpty(goodsList)) {
|
|
|
895
|
+ LOGGER.warn("getSendBackInfoByOrderCode return BuyerOrderGoods is null ,req is {}", req);
|
|
|
896
|
+ return null;
|
|
|
897
|
+ }
|
|
|
898
|
+
|
|
|
899
|
+ BuyerOrderGoods goods = goodsList.get(0);
|
|
|
900
|
+ Integer skup = goods.getSkup();
|
|
|
901
|
+ req.setSkup(skup);
|
|
|
902
|
+ return this.getSendBackInfoBySkup(req);
|
|
|
903
|
+
|
|
|
904
|
+ }
|
881
|
|
905
|
|
882
|
public BuyerOrderResp getSendBackInfoBySkup(BuyerOrderReq req) {
|
906
|
public BuyerOrderResp getSendBackInfoBySkup(BuyerOrderReq req) {
|
|
|
907
|
+ LOGGER.info("getSendBackInfoBySkup enter ,req is {}", req);
|
883
|
SellerOrderMeta meta = sellerOrderMetaMapper.selectBySkupAndKey(req.getSkup(), SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
|
908
|
SellerOrderMeta meta = sellerOrderMetaMapper.selectBySkupAndKey(req.getSkup(), SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
|
884
|
if(null == meta) {
|
909
|
if(null == meta) {
|
885
|
return null;
|
910
|
return null;
|
886
|
}
|
911
|
}
|
887
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
912
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
888
|
BuyerOrderResp result = new BuyerOrderResp();
|
913
|
BuyerOrderResp result = new BuyerOrderResp();
|
|
|
914
|
+ result.setReceiveTitle("卖家地址");
|
|
|
915
|
+ result.setPlatformWaybillTitle("寄回信息");
|
889
|
result.setReceiveName(metaValue.getString("consignee"));
|
916
|
result.setReceiveName(metaValue.getString("consignee"));
|
890
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
917
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
891
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
918
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
|
@@ -1049,6 +1076,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -1049,6 +1076,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
1049
|
//如果是鉴定不通过或者已取消(买家再卖家发货后取消),则地址是卖家地址
|
1076
|
//如果是鉴定不通过或者已取消(买家再卖家发货后取消),则地址是卖家地址
|
1050
|
BuyerOrderResp buyerOrderResp = null;
|
1077
|
BuyerOrderResp buyerOrderResp = null;
|
1051
|
if(buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal()
|
1078
|
if(buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal()
|
|
|
1079
|
+ ||buyerOrder.getStatus().byteValue() == Constant.CANCEL_QUALITY_CHECK_FAKE.getByteVal()
|
|
|
1080
|
+ ||buyerOrder.getStatus().byteValue() == Constant.CANCEL_MINI_FAULT_REJECT.getByteVal()
|
|
|
1081
|
+ ||buyerOrder.getStatus().byteValue() == Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal()
|
1052
|
||buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal()){
|
1082
|
||buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal()){
|
1053
|
List<BuyerOrderGoods> buyerGoodsList = buyerOrderGoodsMapper.selectByOrderCode(Arrays.asList(orderCode));
|
1083
|
List<BuyerOrderGoods> buyerGoodsList = buyerOrderGoodsMapper.selectByOrderCode(Arrays.asList(orderCode));
|
1054
|
if(CollectionUtils.isNotEmpty(buyerGoodsList)) {
|
1084
|
if(CollectionUtils.isNotEmpty(buyerGoodsList)) {
|
|
@@ -1068,6 +1098,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
@@ -1068,6 +1098,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
1068
|
map.put("expressInfoRespList",expressInfoRespList);
|
1098
|
map.put("expressInfoRespList",expressInfoRespList);
|
1069
|
return map;
|
1099
|
return map;
|
1070
|
}
|
1100
|
}
|
|
|
1101
|
+
|
|
|
1102
|
+ //平台的发货物流信息
|
|
|
1103
|
+ public List<ExpressInfoResp> queryPlatformExpressList(String orderCode){
|
|
|
1104
|
+ LOGGER.info("queryPlatformExpressList orderCode is {}", orderCode);
|
|
|
1105
|
+ BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
1106
|
+ if(null == buyerOrder) {
|
|
|
1107
|
+ return null;
|
|
|
1108
|
+ }
|
|
|
1109
|
+
|
|
|
1110
|
+ String expressType = EXPRESS_TYPE_JUDGE_TO_BUYER+","+EXPRESS_TYPE_JUDGE_TO_SELLER+","+EXPRESS_TYPE_RETURN_BACK_TO_SELLER;
|
|
|
1111
|
+ List<ExpressInfoResp> list = queryExpressList(orderCode, expressType);
|
|
|
1112
|
+ if(CollectionUtils.isEmpty(list)) {
|
|
|
1113
|
+ return Lists.newArrayList();
|
|
|
1114
|
+ }
|
|
|
1115
|
+ return list;
|
|
|
1116
|
+ }
|
1071
|
|
1117
|
|
1072
|
public List<ExpressInfoResp> queryExpressList(String orderCode, String expressType) {
|
1118
|
public List<ExpressInfoResp> queryExpressList(String orderCode, String expressType) {
|
1073
|
LOGGER.info("queryExpressList orderCode is {}, expressTypeStr is {}", orderCode, expressType);
|
1119
|
LOGGER.info("queryExpressList orderCode is {}, expressTypeStr is {}", orderCode, expressType);
|