Authored by qinchao

变价消息提醒

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