Commit 70391b3de95134692760a6f5a9aa8e0a15d038f7
1 parent
81bcefb5
update:下单商品单价效验
Showing
1 changed file
with
4 additions
and
0 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/OrderGoodsServiceImpl.java
... | ... | @@ -388,6 +388,10 @@ public class OrderGoodsServiceImpl implements OrderGoodsService { |
388 | 388 | if(!(detail.getData().getAuditState()!=null&&detail.getData().getAuditState().equals(ProductAuditState.PASSED))){ |
389 | 389 | throw new OrderException(OrderErrorCode.PARAM_ERROR,"\""+productName+"\"尚未通过审核"); |
390 | 390 | } |
391 | + Long price =productDto.getProductPrice().multiply(NumberTransform.ONE_HUNDERD).longValue(); | |
392 | + if(!price.equals(detail.getData().getPresets().get(0).getPrePrice())){ | |
393 | + throw new OrderException(OrderErrorCode.PARAM_ERROR,"提交失败,商品信息有更新,点击【确定】返回至购物车"); | |
394 | + } | |
391 | 395 | }else{ |
392 | 396 | throw new OrderException(OrderErrorCode.PARAM_ERROR,"\""+productName+"\"异常,未找到该商品"); |
393 | 397 | } | ... | ... |