...
|
...
|
@@ -865,6 +865,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
}
|
|
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
|
|
BuyerOrderResp result = new BuyerOrderResp();
|
|
|
result.setReceiveTitle("买家地址");
|
|
|
result.setPlatformWaybillTitle("发货信息");
|
|
|
result.setReceiveName(metaValue.getString("consignee"));
|
|
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
...
|
...
|
@@ -878,14 +880,39 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public BuyerOrderResp getSendBackInfoByOrderCode(BuyerOrderReq req){
|
|
|
LOGGER.info("getSendBackInfoByOrderCode enter ,req is {}", req);
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(req.getOrderCode());
|
|
|
if(null == buyerOrder) {
|
|
|
LOGGER.warn("getSendBackInfoByOrderCode return buyerOrder is null ,req is {}", req);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
//查询buyer_order_goods
|
|
|
List<BuyerOrderGoods> goodsList = buyerOrderGoodsMapper.selectByOrderCode(Lists.newArrayList(buyerOrder.getOrderCode()));
|
|
|
if(CollectionUtils.isEmpty(goodsList)) {
|
|
|
LOGGER.warn("getSendBackInfoByOrderCode return BuyerOrderGoods is null ,req is {}", req);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
BuyerOrderGoods goods = goodsList.get(0);
|
|
|
Integer skup = goods.getSkup();
|
|
|
req.setSkup(skup);
|
|
|
return this.getSendBackInfoBySkup(req);
|
|
|
|
|
|
}
|
|
|
|
|
|
public BuyerOrderResp getSendBackInfoBySkup(BuyerOrderReq req) {
|
|
|
LOGGER.info("getSendBackInfoBySkup enter ,req is {}", req);
|
|
|
SellerOrderMeta meta = sellerOrderMetaMapper.selectBySkupAndKey(req.getSkup(), SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
|
|
|
if(null == meta) {
|
|
|
return null;
|
|
|
}
|
|
|
JSONObject metaValue = JSONObject.parseObject(meta.getMetaValue());
|
|
|
BuyerOrderResp result = new BuyerOrderResp();
|
|
|
result.setReceiveTitle("卖家地址");
|
|
|
result.setPlatformWaybillTitle("寄回信息");
|
|
|
result.setReceiveName(metaValue.getString("consignee"));
|
|
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
...
|
...
|
@@ -1049,6 +1076,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
//如果是鉴定不通过或者已取消(买家再卖家发货后取消),则地址是卖家地址
|
|
|
BuyerOrderResp buyerOrderResp = null;
|
|
|
if(buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal()
|
|
|
||buyerOrder.getStatus().byteValue() == Constant.CANCEL_QUALITY_CHECK_FAKE.getByteVal()
|
|
|
||buyerOrder.getStatus().byteValue() == Constant.CANCEL_MINI_FAULT_REJECT.getByteVal()
|
|
|
||buyerOrder.getStatus().byteValue() == Constant.CANCEL_MINI_FAULT_OUT_TIME_REJECT.getByteVal()
|
|
|
||buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_BUYER_CANCEL_AFTER_SELLER_DELIVERY.getByteVal()){
|
|
|
List<BuyerOrderGoods> buyerGoodsList = buyerOrderGoodsMapper.selectByOrderCode(Arrays.asList(orderCode));
|
|
|
if(CollectionUtils.isNotEmpty(buyerGoodsList)) {
|
...
|
...
|
@@ -1068,6 +1098,22 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
map.put("expressInfoRespList",expressInfoRespList);
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
//平台的发货物流信息
|
|
|
public List<ExpressInfoResp> queryPlatformExpressList(String orderCode){
|
|
|
LOGGER.info("queryPlatformExpressList orderCode is {}", orderCode);
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
if(null == buyerOrder) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
String expressType = EXPRESS_TYPE_JUDGE_TO_BUYER+","+EXPRESS_TYPE_JUDGE_TO_SELLER+","+EXPRESS_TYPE_RETURN_BACK_TO_SELLER;
|
|
|
List<ExpressInfoResp> list = queryExpressList(orderCode, expressType);
|
|
|
if(CollectionUtils.isEmpty(list)) {
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
public List<ExpressInfoResp> queryExpressList(String orderCode, String expressType) {
|
|
|
LOGGER.info("queryExpressList orderCode is {}, expressTypeStr is {}", orderCode, expressType);
|
...
|
...
|
|