@@ -352,6 +352,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
if(totalPrice.compareTo(zero) < 0){
//价格不能小于0.01
totalPrice = zero;
+ }
+ if(totalPrice==null){
throw new CustomException("金额错误"+totalPrice);
}
add.setOrderPrice(totalPrice);