Authored by LUOXC

fixbug

@@ -677,8 +677,6 @@ public class SkupListService { @@ -677,8 +677,6 @@ public class SkupListService {
677 private final static int secondsOf2Hours = 2*3600; 677 private final static int secondsOf2Hours = 2*3600;
678 private List<SellerOrderGoods> getSellerOrderGoodsBySellerChangePriceRecords(List<SellerChangePriceRecord> needChangePriceRecords){ 678 private List<SellerOrderGoods> getSellerOrderGoodsBySellerChangePriceRecords(List<SellerChangePriceRecord> needChangePriceRecords){
679 int dtOf2Hours = DateUtil.getCurrentTimeSecond() - secondsOf2Hours; 679 int dtOf2Hours = DateUtil.getCurrentTimeSecond() - secondsOf2Hours;
680 - List<SellerOrderGoods> result = null;  
681 - List<Integer> skups = null;  
682 Iterator<SellerChangePriceRecord> ncprIter = needChangePriceRecords.iterator(); 680 Iterator<SellerChangePriceRecord> ncprIter = needChangePriceRecords.iterator();
683 SellerChangePriceRecord scpr; 681 SellerChangePriceRecord scpr;
684 while (ncprIter.hasNext()){ 682 while (ncprIter.hasNext()){
@@ -691,13 +689,15 @@ public class SkupListService { @@ -691,13 +689,15 @@ public class SkupListService {
691 ncprIter.remove(); 689 ncprIter.remove();
692 } 690 }
693 } 691 }
  692 + if(needChangePriceRecords.isEmpty()){
  693 + return Lists.newArrayList();
  694 + }
694 695
695 - skups = needChangePriceRecords.parallelStream() 696 + List<Integer> skups = needChangePriceRecords.parallelStream()
696 .map(SellerChangePriceRecord::getSkup) 697 .map(SellerChangePriceRecord::getSkup)
697 .collect(Collectors.toList()); 698 .collect(Collectors.toList());
698 skups.add(needChangePriceRecords.get(0).getPreSkup()); 699 skups.add(needChangePriceRecords.get(0).getPreSkup());
699 - result = sellerOrderGoodsMapper.selectBySkups(skups);  
700 - return result; 700 + return sellerOrderGoodsMapper.selectBySkups(skups);
701 } 701 }
702 702
703 703