Authored by wujiexiang

判空

... ... @@ -123,6 +123,9 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO
@Override
List<BuyerOrderMeta> getBuyerOrderMetas(int uid, List<BuyerOrder> buyerOrders) {
List<Long> orderCodeList = buyerOrders.stream().filter(BuyerOrder::isBidOrder).map(BuyerOrder::getOrderCode).collect(Collectors.toList());
if (CollectionUtils.isEmpty(orderCodeList)) {
return Lists.newArrayList();
}
return buyerOrderMetaMapper.selectByOrderCodesAndMetaKeys(uid, orderCodeList, Lists.newArrayList(MetaKey.BID_KEY));
}
... ...
... ... @@ -8,6 +8,7 @@ import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.common.Operator;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -111,6 +112,9 @@ public class BidProductProxyService extends AbsProxyService {
public Map<Integer, BidStoragePriceResp> getStatisticalPrice(Set<Integer> storageIds) {
logger.info("getStatisticalPrice,storageIds:{}", storageIds);
if (CollectionUtils.isEmpty(storageIds)) {
return Collections.EMPTY_MAP;
}
try {
BidStoragePriceResp[] resps = getResultFromApiResponse(ufoServiceCaller.call(GET_STATISTICAL_PRICE_API, storageIds), BidStoragePriceResp[].class);
if (ArrayUtils.isEmpty(resps)) {
... ...