...
|
...
|
@@ -98,7 +98,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
private AppraiseAddressMapper appraiseAddressMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private AreaMapper areaMapper;
|
|
|
private AreaService areaService;
|
|
|
|
|
|
@Autowired
|
|
|
private OrderOperateRecordMapper orderOperateRecordMapper;
|
...
|
...
|
@@ -1351,7 +1351,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
result.setPlatformWaybillTitle("发货信息");
|
|
|
result.setReceiveName(metaValue.getString("consignee"));
|
|
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
|
|
result.setReceiveAddress(metaValue.getString("area") + metaValue.getString("address"));
|
|
|
ExpressRecord record = expressRecordMapper.selectByOrderCodeAndType(req.getOrderCode(), null, EXPRESS_TYPE_JUDGE_TO_BUYER);
|
|
|
if(null == record) {
|
|
|
return result;
|
...
|
...
|
@@ -1434,7 +1434,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
result.setPlatformWaybillTitle("寄回信息");
|
|
|
result.setReceiveName(metaValue.getString("consignee"));
|
|
|
result.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
result.setReceiveAddress(getAddressInfo(metaValue.getString("areaCode")) + metaValue.getString("address"));
|
|
|
result.setReceiveAddress(metaValue.getString("area") + metaValue.getString("address"));
|
|
|
|
|
|
if(StringUtils.isEmpty(req.getOrderCode())) {
|
|
|
return result;
|
...
|
...
|
@@ -1506,7 +1506,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setReceiveAddressDetail(metaValue.getString("address"));
|
|
|
resp.setZipCode("null".equals(metaValue.getString("zipCode")) ? "--" : metaValue.getString("zipCode"));
|
|
|
String receiveAddressCode = metaValue.getString("areaCode");
|
|
|
resp.setReceiveAddress(getAddressInfo(receiveAddressCode));
|
|
|
resp.setReceiveAddress(metaValue.getString("area"));
|
|
|
|
|
|
//查询buyer_order_goods
|
|
|
List<BuyerOrderGoods> goodsList = buyerOrderGoodsMapper.selectByOrderCode(Lists.newArrayList(buyerOrder.getOrderCode()));
|
...
|
...
|
@@ -1526,7 +1526,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
if(sellerMeta!=null){
|
|
|
JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue());
|
|
|
resp.setSellerRebackAddressDetail(sellerMetaValue.getString("address"));
|
|
|
resp.setSellerRebackAddress(getAddressInfo(sellerMetaValue.getString("areaCode")));
|
|
|
resp.setSellerRebackAddress(sellerMetaValue.getString("area"));
|
|
|
resp.setSellerRebackMobile(sellerMetaValue.getString("mobile"));
|
|
|
resp.setSellerZipCode("null".equals(sellerMetaValue.getString("zipCode")) ? "--" : sellerMetaValue.getString("zipCode"));
|
|
|
}
|
...
|
...
|
@@ -1853,8 +1853,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
Integer secondId = Integer.valueOf(areaCode.substring(0, 4));
|
|
|
Integer thirdId = Integer.valueOf(areaCode.substring(0, 6));
|
|
|
Integer fourthId = Integer.valueOf(areaCode);
|
|
|
List<Area> areaList = areaMapper.selectByCodeList(Lists.newArrayList(firstId, secondId, thirdId, fourthId));
|
|
|
Map<Integer, String> areaMap = areaList.stream().collect(Collectors.toMap(Area::getId, Area::getCaption));
|
|
|
Map<Integer, String> areaMap = areaService.selectByCodeList(Lists.newArrayList(firstId, secondId, thirdId, fourthId));
|
|
|
String dProvince = areaMap.get(firstId).replace("省", "").replace("市", "");
|
|
|
jsonObj.put("dProvince", dProvince);
|
|
|
jsonObj.put("dCity", areaMap.get(secondId).replace("市", ""));
|
...
|
...
|
@@ -1902,7 +1901,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
resp.setReceiveAddressDetail(metaValue.getString("address"));
|
|
|
String receiveAddressCode = metaValue.getString("areaCode");
|
|
|
resp.setReceiveAddress(getAddressInfo(receiveAddressCode));
|
|
|
resp.setReceiveAddress(metaValue.getString("area"));
|
|
|
}
|
|
|
|
|
|
if(buyerOrder.getStatus().byteValue() == Constant.BUYER_ORDER_STATUS_JUDGE_NOT_PASS.getByteVal()) {
|
...
|
...
|
@@ -1912,7 +1911,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
if(sellerMeta!=null){
|
|
|
JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue());
|
|
|
resp.setSellerRebackAddressDetail(sellerMetaValue.getString("address"));
|
|
|
resp.setSellerRebackAddress(getAddressInfo(sellerMetaValue.getString("areaCode")));
|
|
|
resp.setSellerRebackAddress(sellerMetaValue.getString("area"));
|
|
|
resp.setSellerRebackMobile(sellerMetaValue.getString("mobile"));
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -2154,16 +2153,14 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
|
|
|
List<Area> areaList = areaMapper.selectByParentCode(parentCode);
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
for (Area area : areaList) {
|
|
|
JSONObject jo = new JSONObject();
|
|
|
// 地区
|
|
|
jo.put("id", area.getId());
|
|
|
jo.put("caption", area.getCaption());
|
|
|
result.add(jo);
|
|
|
}
|
|
|
|
|
|
Map<Integer, String> stringMap = areaService.selectByParentCode(parentCode);
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
for (Map.Entry<Integer, String> item : stringMap.entrySet()) {
|
|
|
JSONObject jo = new JSONObject();
|
|
|
jo.put("id", item.getKey());
|
|
|
jo.put("caption", item.getValue()); // 地区
|
|
|
result.add(jo);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -2237,7 +2234,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
metaValue.replace("address", req.getReceiveAddressDetail());
|
|
|
metaValue.replace("zipCode", req.getReceiveZipCode());
|
|
|
metaValue.replace("areaCode", req.getReceiveAreaCode());
|
|
|
metaValue.replace("area", getAddressInfo(req.getReceiveAreaCode()));
|
|
|
metaValue.replace("area", req.getArea());
|
|
|
|
|
|
BuyerOrderMetaUpdateReq metaReq = new BuyerOrderMetaUpdateReq();
|
|
|
metaReq.setOrderCode(Long.valueOf(req.getOrderCode()));
|
...
|
...
|
@@ -2272,7 +2269,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
orderOperateRecordMapper.insert(optRecord);
|
|
|
}
|
|
|
|
|
|
private String getAddressInfo(String areaCode) {
|
|
|
/*private String getAddressInfo(String areaCode) {
|
|
|
//查询四级地址,比如id=110102001:北京市北京市西城区西长安街街道办事处,11-北京市, 1101-北京市, 110102-西城区 110102001-西长安街街道办事处
|
|
|
Integer firstId = Integer.valueOf(areaCode.substring(0, 2));
|
|
|
Integer secondId = Integer.valueOf(areaCode.substring(0, 4));
|
...
|
...
|
@@ -2281,7 +2278,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
List<Area> areaList = areaMapper.selectByCodeList(Lists.newArrayList(firstId, secondId, thirdId, fourthId));
|
|
|
Map<Integer, String> areaMap = areaList.stream().collect(Collectors.toMap(Area::getId, Area::getCaption));
|
|
|
return areaMap.get(firstId) + " " + areaMap.get(secondId) + " " + areaMap.get(thirdId) + " " + areaMap.get(fourthId);
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
private String getMobileByUid(Integer uid) {
|
|
|
LOGGER.info("call getMobileByUid uid is{}", uid);
|
...
|
...
|
@@ -2455,8 +2452,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setReceiveName(metaValue.getString("consignee"));
|
|
|
resp.setReceiveMobile(metaValue.getString("mobile"));
|
|
|
String receiveAddressCode = metaValue.getString("areaCode");
|
|
|
resp.setReceiveAddress(getAddressInfo(receiveAddressCode));
|
|
|
resp.setNfcStatus(CollectionUtils.isEmpty(identifyMap.get(item.getOrderCode())) ? 0 : 1);//0:未写入,1:已写入
|
|
|
resp.setReceiveAddress(metaValue.getString("area"));
|
|
|
resp.setNfcStatus(CollectionUtils.isEmpty(identifyMap.get(item.getOrderCode())) ? 0 : 1);//0:未写入,1:已写入
|
|
|
|
|
|
respList.add(resp);
|
|
|
}
|
...
|
...
|
|