Authored by qinchao

预售订单不发更低价提醒的push

@@ -12,6 +12,7 @@ import com.yohoufo.dal.order.SellerOrderGoodsViewMapper; @@ -12,6 +12,7 @@ import com.yohoufo.dal.order.SellerOrderGoodsViewMapper;
12 import com.yohoufo.dal.order.model.SellerOrderGoods; 12 import com.yohoufo.dal.order.model.SellerOrderGoods;
13 import com.yohoufo.order.event.SellerOrderPriceChangeEvent; 13 import com.yohoufo.order.event.SellerOrderPriceChangeEvent;
14 import com.yohoufo.order.service.proxy.InBoxFacade; 14 import com.yohoufo.order.service.proxy.InBoxFacade;
  15 +import com.yohoufo.order.utils.OrderAssist;
15 import org.apache.commons.collections.CollectionUtils; 16 import org.apache.commons.collections.CollectionUtils;
16 import org.slf4j.Logger; 17 import org.slf4j.Logger;
17 import org.slf4j.LoggerFactory; 18 import org.slf4j.LoggerFactory;
@@ -68,7 +69,8 @@ public class SellerOrderPriceChangeHandler implements IEventHandler<SellerOrderP @@ -68,7 +69,8 @@ public class SellerOrderPriceChangeHandler implements IEventHandler<SellerOrderP
68 //根据storageId获取所有在售的卖家的订单 69 //根据storageId获取所有在售的卖家的订单
69 List<SellerOrderGoods> noticeList= sellerOrderGoodsViewMapper.selectCanSellByStorageId(storageId); 70 List<SellerOrderGoods> noticeList= sellerOrderGoodsViewMapper.selectCanSellByStorageId(storageId);
70 //把自己过滤掉,只保留价格高于当前价格 71 //把自己过滤掉,只保留价格高于当前价格
71 - noticeList = noticeList.stream().filter(r->r.getGoodsPrice().compareTo(changedPrice)>0&&changedSellerUid!=r.getUid().intValue()).collect(Collectors.toList()); 72 + //非预售的订单才push
  73 + noticeList = noticeList.stream().filter(r-> !OrderAssist.skupIsAdvance(r.getAttributes())&&r.getGoodsPrice().compareTo(changedPrice)>0&&changedSellerUid!=r.getUid().intValue()).collect(Collectors.toList());
72 if(CollectionUtils.isEmpty(noticeList)){ 74 if(CollectionUtils.isEmpty(noticeList)){
73 logger.warn("Subscribe SellerOrderPriceChangeEvent msg return SellerOrderGoods with empty same storage id , event {} ,sog {}", event,sog); 75 logger.warn("Subscribe SellerOrderPriceChangeEvent msg return SellerOrderGoods with empty same storage id , event {} ,sog {}", event,sog);
74 return ; 76 return ;