Showing
1 changed file
with
2 additions
and
1 deletions
@@ -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 |
-
Please register or login to post a comment