...
|
...
|
@@ -116,6 +116,7 @@ public class BuyerBidPriceService { |
|
|
.storageId(context.sellerOrderGoods.getStorageId())
|
|
|
.price(context.newPrice)
|
|
|
.skupType(context.sellerOrderGoods.getAttributes())
|
|
|
.day(context.day)
|
|
|
.userAddressPair(context.userAddressPair)
|
|
|
.businessClient(request.getBusinessClient())
|
|
|
.build();
|
...
|
...
|
@@ -158,27 +159,27 @@ public class BuyerBidPriceService { |
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
List<BuyerOrderMeta> addresses = buyerOrderMetaMapper.selectByMetaKeys(uid, orderCode, Lists.newArrayList(MetaKey.BUYER_DELIVERY_ADDRESS, MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS, MetaKey.BID_KEY));
|
|
|
if (addresses == null) {
|
|
|
List<BuyerOrderMeta> buyerOrderMetas = buyerOrderMetaMapper.selectByMetaKeys(uid, orderCode, Lists.newArrayList(MetaKey.BUYER_DELIVERY_ADDRESS, MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS, MetaKey.BID_KEY));
|
|
|
if (buyerOrderMetas == null) {
|
|
|
logger.warn("getAddresses not exist, orderCode is {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
AddressInfo addressInfo = addresses.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BUYER_DELIVERY_ADDRESS))
|
|
|
AddressInfo addressInfo = buyerOrderMetas.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BUYER_DELIVERY_ADDRESS))
|
|
|
.map(meta -> BuyerOrderMetaMapperSupport.convert(meta, AddressInfo.class)).findFirst().orElse(null);
|
|
|
if (addressInfo == null) {
|
|
|
logger.warn("addressInfo not exist, orderCode is {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
AddressInfo hiddenAddressInfo = addresses.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS))
|
|
|
AddressInfo hiddenAddressInfo = buyerOrderMetas.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS))
|
|
|
.map(meta -> BuyerOrderMetaMapperSupport.convert(meta, AddressInfo.class)).findFirst().orElse(null);
|
|
|
if (hiddenAddressInfo == null) {
|
|
|
logger.warn("hiddenAddressInfo not exist, orderCode is {}", orderCode);
|
|
|
throw new ServiceException(ServiceError.ORDER_NULL);
|
|
|
}
|
|
|
|
|
|
BidOrderMetaBo bidOrderMetaBo = addresses.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BID_KEY))
|
|
|
BidOrderMetaBo bidOrderMetaBo = buyerOrderMetas.stream().filter(meta -> StringUtils.equals(meta.getMetaKey(), MetaKey.BID_KEY))
|
|
|
.map(meta -> BuyerOrderMetaMapperSupport.convert(meta, BidOrderMetaBo.class)).findFirst().orElse(null);
|
|
|
if (bidOrderMetaBo == null) {
|
|
|
logger.warn("bidOrderMetaBo not exist, orderCode is {}", orderCode);
|
...
|
...
|
|