Showing
3 changed files
with
10 additions
and
8 deletions
@@ -154,7 +154,7 @@ public class MsgService { | @@ -154,7 +154,7 @@ public class MsgService { | ||
154 | Product product){ | 154 | Product product){ |
155 | logger.info(logTitle + " ready 2 send push, uid {} sku {} prdName {} sceneKey {} securityKey {}", | 155 | logger.info(logTitle + " ready 2 send push, uid {} sku {} prdName {} sceneKey {} securityKey {}", |
156 | uid, sellerOrderGoods.getStorageId(), product.getProductName(), sceneKey, securityKey); | 156 | uid, sellerOrderGoods.getStorageId(), product.getProductName(), sceneKey, securityKey); |
157 | - MessageCenterEvent centerEvent = buildCommonPrdMsg(uid, sellerOrderGoods, product); | 157 | + MessageCenterEvent centerEvent = buildCommonPrdMsg(uid, tabType, sellerOrderGoods, product); |
158 | centerEvent.setSendScene(sceneKey); | 158 | centerEvent.setSendScene(sceneKey); |
159 | centerEvent.setSecurityKey(securityKey); | 159 | centerEvent.setSecurityKey(securityKey); |
160 | msgCenterHandler.send(centerEvent); | 160 | msgCenterHandler.send(centerEvent); |
@@ -168,7 +168,8 @@ public class MsgService { | @@ -168,7 +168,8 @@ public class MsgService { | ||
168 | } | 168 | } |
169 | 169 | ||
170 | 170 | ||
171 | - private static MessageCenterEvent buildCommonPrdMsg(Integer uid, SellerOrderGoods sellerOrderGoods, Product product){ | 171 | + private static MessageCenterEvent buildCommonPrdMsg(Integer uid, TabType tabType, |
172 | + SellerOrderGoods sellerOrderGoods, Product product){ | ||
172 | MessageCenterEvent centerEvent = new MessageCenterEvent(); | 173 | MessageCenterEvent centerEvent = new MessageCenterEvent(); |
173 | centerEvent.setUserType("UID"); //根据userList的类型可选:UID,MOBILE,TOKEM,OPENID | 174 | centerEvent.setUserType("UID"); //根据userList的类型可选:UID,MOBILE,TOKEM,OPENID |
174 | centerEvent.setUserList(Lists.newArrayList(String.valueOf(uid))); | 175 | centerEvent.setUserList(Lists.newArrayList(String.valueOf(uid))); |
@@ -59,18 +59,19 @@ public class SellerDecrPriceTaskHandler extends AbstractSellerAdjustPriceTaskHan | @@ -59,18 +59,19 @@ public class SellerDecrPriceTaskHandler extends AbstractSellerAdjustPriceTaskHan | ||
59 | notifyProductToUpdatePrice(uid, taskId,result.successSkups, cppDto.getSalePrice()); | 59 | notifyProductToUpdatePrice(uid, taskId,result.successSkups, cppDto.getSalePrice()); |
60 | 60 | ||
61 | //push buyer of biding order if necessary | 61 | //push buyer of biding order if necessary |
62 | - pushBuyerOfBidOrderIfPresent(successOrderGoods); | 62 | + pushBuyerOfBidOrderIfPresent(successOrderGoods,cppDto); |
63 | 63 | ||
64 | //清理缓存 | 64 | //清理缓存 |
65 | cleanCache(uid, successOrderGoods); | 65 | cleanCache(uid, successOrderGoods); |
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | - private void pushBuyerOfBidOrderIfPresent(List<SellerOrderGoods> successOrderGoods){ | 69 | + private void pushBuyerOfBidOrderIfPresent(List<SellerOrderGoods> successOrderGoods, ChangePricePrepareDTO cpp){ |
70 | if (CollectionUtils.isEmpty(successOrderGoods)){ | 70 | if (CollectionUtils.isEmpty(successOrderGoods)){ |
71 | return; | 71 | return; |
72 | } | 72 | } |
73 | SellerOrderGoods sog = successOrderGoods.get(0); | 73 | SellerOrderGoods sog = successOrderGoods.get(0); |
74 | + sog.setGoodsPrice(cpp.getSalePrice()); | ||
74 | log.info("pushBuyerOfBidOrderIfPresent {}",sog); | 75 | log.info("pushBuyerOfBidOrderIfPresent {}",sog); |
75 | sellerNoticeFacade.pushMsg2BuyerWhenSellerChangePrice(sog); | 76 | sellerNoticeFacade.pushMsg2BuyerWhenSellerChangePrice(sog); |
76 | } | 77 | } |
@@ -169,11 +169,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | @@ -169,11 +169,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | ||
169 | List<Integer> statusList = Lists.newArrayList(SkupStatus.CAN_SELL.getCode()); | 169 | List<Integer> statusList = Lists.newArrayList(SkupStatus.CAN_SELL.getCode()); |
170 | Set<Integer> skupTypes = Sets.newHashSet(skupType.getCode()); | 170 | Set<Integer> skupTypes = Sets.newHashSet(skupType.getCode()); |
171 | Integer sku = soldProduct.getStorageId(); | 171 | Integer sku = soldProduct.getStorageId(); |
172 | - BigDecimal leastPrice; | 172 | + BigDecimal leastPrice = null; |
173 | //卖家的现货出价是否是全网最低价 | 173 | //卖家的现货出价是否是全网最低价 |
174 | boolean pushEnable = skupType.equals(SkupType.IN_STOCK) | 174 | boolean pushEnable = skupType.equals(SkupType.IN_STOCK) |
175 | && Objects.nonNull(leastPrice=skupService.getLeastPriceOfSku(sku , statusList, skupTypes)) | 175 | && Objects.nonNull(leastPrice=skupService.getLeastPriceOfSku(sku , statusList, skupTypes)) |
176 | - && leastPrice.compareTo(soldProduct.getPrice())<=0; | 176 | + && leastPrice.compareTo(soldProduct.getPrice())>=0; |
177 | Supplier<SendMessageRspBo> pushSupplier = null; | 177 | Supplier<SendMessageRspBo> pushSupplier = null; |
178 | if (pushEnable){ | 178 | if (pushEnable){ |
179 | List<Integer> uids = bidProductProxyService.getAllUidBySku(sku); | 179 | List<Integer> uids = bidProductProxyService.getAllUidBySku(sku); |
@@ -201,11 +201,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | @@ -201,11 +201,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | ||
201 | List<Integer> statusList = Lists.newArrayList(SkupStatus.CAN_SELL.getCode()); | 201 | List<Integer> statusList = Lists.newArrayList(SkupStatus.CAN_SELL.getCode()); |
202 | Set<Integer> skupTypes = Sets.newHashSet(skupType.getCode()); | 202 | Set<Integer> skupTypes = Sets.newHashSet(skupType.getCode()); |
203 | Integer sku = tsog.getStorageId(); | 203 | Integer sku = tsog.getStorageId(); |
204 | - BigDecimal leastPrice; | 204 | + BigDecimal leastPrice = null; |
205 | //卖家的现货出价是否是全网最低价 | 205 | //卖家的现货出价是否是全网最低价 |
206 | boolean pushEnable = skupType.equals(SkupType.IN_STOCK) | 206 | boolean pushEnable = skupType.equals(SkupType.IN_STOCK) |
207 | && Objects.nonNull(leastPrice=skupService.getLeastPriceOfSku(sku , statusList, skupTypes)) | 207 | && Objects.nonNull(leastPrice=skupService.getLeastPriceOfSku(sku , statusList, skupTypes)) |
208 | - && leastPrice.compareTo(tsog.getGoodsPrice())<=0; | 208 | + && leastPrice.compareTo(tsog.getGoodsPrice())>=0; |
209 | Supplier pushSupplier = null; | 209 | Supplier pushSupplier = null; |
210 | if (pushEnable){ | 210 | if (pushEnable){ |
211 | List<Integer> uids = bidProductProxyService.getAllUidBySku(sku); | 211 | List<Integer> uids = bidProductProxyService.getAllUidBySku(sku); |
-
Please register or login to post a comment