Merge branch 'dev_bid' into test6.9.13
Showing
1 changed file
with
7 additions
and
5 deletions
@@ -71,7 +71,7 @@ public class BuyerBidPriceService { | @@ -71,7 +71,7 @@ public class BuyerBidPriceService { | ||
71 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); | 71 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); |
72 | 72 | ||
73 | //校验 | 73 | //校验 |
74 | - validate(context); | 74 | + validate(context, false); |
75 | 75 | ||
76 | //构建参数 | 76 | //构建参数 |
77 | BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(request.getUid()).storageId(context.sellerOrderGoods.getStorageId()) | 77 | BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(request.getUid()).storageId(context.sellerOrderGoods.getStorageId()) |
@@ -87,7 +87,7 @@ public class BuyerBidPriceService { | @@ -87,7 +87,7 @@ public class BuyerBidPriceService { | ||
87 | int uid = request.getUid(); | 87 | int uid = request.getUid(); |
88 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); | 88 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); |
89 | //校验 | 89 | //校验 |
90 | - validate(context); | 90 | + validate(context, true); |
91 | //构建参数 | 91 | //构建参数 |
92 | BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(uid) | 92 | BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(uid) |
93 | .storageId(context.sellerOrderGoods.getStorageId()) | 93 | .storageId(context.sellerOrderGoods.getStorageId()) |
@@ -102,7 +102,7 @@ public class BuyerBidPriceService { | @@ -102,7 +102,7 @@ public class BuyerBidPriceService { | ||
102 | int uid = request.getUid(); | 102 | int uid = request.getUid(); |
103 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); | 103 | BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request); |
104 | //校验 | 104 | //校验 |
105 | - validate(context); | 105 | + validate(context, true); |
106 | 106 | ||
107 | int oldSkup = context.sellerOrderGoods.getId(); | 107 | int oldSkup = context.sellerOrderGoods.getId(); |
108 | logger.info("[{}] will change price,orderCode:{},oldSkup:{}", uid, context.buyerOrder.getOrderCode(), oldSkup); | 108 | logger.info("[{}] will change price,orderCode:{},oldSkup:{}", uid, context.buyerOrder.getOrderCode(), oldSkup); |
@@ -191,8 +191,10 @@ public class BuyerBidPriceService { | @@ -191,8 +191,10 @@ public class BuyerBidPriceService { | ||
191 | } | 191 | } |
192 | 192 | ||
193 | 193 | ||
194 | - private void validate(BidOrderChangePriceContext context) { | ||
195 | - validateSamePrice(context.buyerOrder, context.newPrice, context.sellerOrderGoods.getGoodsPrice()); | 194 | + private void validate(BidOrderChangePriceContext context,boolean validateBidPrice) { |
195 | + if (validateBidPrice) { | ||
196 | + validateSamePrice(context.buyerOrder, context.newPrice, context.sellerOrderGoods.getGoodsPrice()); | ||
197 | + } | ||
196 | validateBuyerOrderStatus(context.buyerOrder); | 198 | validateBuyerOrderStatus(context.buyerOrder); |
197 | validateWaitingChangePriceRecord(context.buyerOrder); | 199 | validateWaitingChangePriceRecord(context.buyerOrder); |
198 | } | 200 | } |
-
Please register or login to post a comment