Commit 2a4d05158ae12ddab02b1fce6ee720ebbd0e2001

Authored by fengliang
1 parent 70391b3d

update:下单商品单价效验

etrade-order/src/main/java/com/diligrp/etrade/order/exception/OrderErrorCode.java
@@ -25,4 +25,7 @@ public class OrderErrorCode { @@ -25,4 +25,7 @@ public class OrderErrorCode {
25 25
26 // 参数异常 26 // 参数异常
27 public static final int PAYING = 620015; 27 public static final int PAYING = 620015;
  28 +
  29 + //商品价格异常
  30 + public static final int PARAM_PRICE_ERROR = 620017;
28 } 31 }
etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/OrderGoodsServiceImpl.java
@@ -390,7 +390,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService { @@ -390,7 +390,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService {
390 } 390 }
391 Long price =productDto.getProductPrice().multiply(NumberTransform.ONE_HUNDERD).longValue(); 391 Long price =productDto.getProductPrice().multiply(NumberTransform.ONE_HUNDERD).longValue();
392 if(!price.equals(detail.getData().getPresets().get(0).getPrePrice())){ 392 if(!price.equals(detail.getData().getPresets().get(0).getPrePrice())){
393 - throw new OrderException(OrderErrorCode.PARAM_ERROR,"提交失败,商品信息有更新,点击【确定】返回至购物车"); 393 + throw new OrderException(OrderErrorCode.PARAM_PRICE_ERROR,"提交失败,商品信息有更新,点击【确定】返回至购物车");
394 } 394 }
395 }else{ 395 }else{
396 throw new OrderException(OrderErrorCode.PARAM_ERROR,"\""+productName+"\"异常,未找到该商品"); 396 throw new OrderException(OrderErrorCode.PARAM_ERROR,"\""+productName+"\"异常,未找到该商品");