Authored by wujiexiang

求购调价

... ... @@ -71,7 +71,7 @@ public class BuyerBidPriceService {
BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request);
//校验
validate(context);
validate(context, false);
//构建参数
BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(request.getUid()).storageId(context.sellerOrderGoods.getStorageId())
... ... @@ -87,7 +87,7 @@ public class BuyerBidPriceService {
int uid = request.getUid();
BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request);
//校验
validate(context);
validate(context, true);
//构建参数
BuyerBidPublishRequest req = BuyerBidPublishRequest.builder().uid(uid)
.storageId(context.sellerOrderGoods.getStorageId())
... ... @@ -102,7 +102,7 @@ public class BuyerBidPriceService {
int uid = request.getUid();
BidOrderChangePriceContext context = buildBidOrderChangePriceContext(request);
//校验
validate(context);
validate(context, true);
int oldSkup = context.sellerOrderGoods.getId();
logger.info("[{}] will change price,orderCode:{},oldSkup:{}", uid, context.buyerOrder.getOrderCode(), oldSkup);
... ... @@ -190,8 +190,10 @@ public class BuyerBidPriceService {
}
private void validate(BidOrderChangePriceContext context) {
private void validate(BidOrderChangePriceContext context,boolean validateBidPrice) {
if (validateBidPrice) {
validateSamePrice(context.buyerOrder, context.newPrice, context.sellerOrderGoods.getGoodsPrice());
}
validateBuyerOrderStatus(context.buyerOrder);
validateWaitingChangePriceRecord(context.buyerOrder);
}
... ...