...
|
...
|
@@ -65,11 +65,12 @@ public class SellerOrderPriceChangeHandler implements IEventHandler<SellerOrderP |
|
|
logger.warn("Subscribe SellerOrderPriceChangeEvent msg return SellerOrderGoods status is not can sell , event {} ,sog {}", event,sog);
|
|
|
return ;
|
|
|
}
|
|
|
int changedSellerUid = sog.getUid();
|
|
|
BigDecimal changedPrice = sog.getGoodsPrice();
|
|
|
//根据storageId获取所有在售的卖家的订单
|
|
|
List<SellerOrderGoods> list= sellerOrderGoodsViewMapper.selectCanSellByStorageId(sog.getStorageId());
|
|
|
//把自己过滤掉,只保留价格高于当前价格
|
|
|
list = list.stream().filter(r->r.getGoodsPrice().compareTo(changedPrice)>0).collect(Collectors.toList());
|
|
|
list = list.stream().filter(r->r.getGoodsPrice().compareTo(changedPrice)>0&&changedSellerUid!=r.getUid().intValue()).collect(Collectors.toList());
|
|
|
//从redis过滤uid+storgeid+date
|
|
|
Date currentTime = new Date();
|
|
|
String dateString = formatter.format(currentTime);//2019-03-20
|
...
|
...
|
|