|
@@ -127,7 +127,7 @@ public class OrderService extends ServiceImpl<OrderMapper, Order> {
|
|
BigDecimal withVocherPriceBig =allPriceBig.subtract(voucherMonBig);
|
|
BigDecimal withVocherPriceBig =allPriceBig.subtract(voucherMonBig);
|
|
BigDecimal discontBig =new BigDecimal(discount.toString());
|
|
BigDecimal discontBig =new BigDecimal(discount.toString());
|
|
|
|
|
|
- if(voucherMonBig.doubleValue()<=0){
|
|
|
|
|
|
+ if(withVocherPriceBig.doubleValue()<=0){
|
|
withVocherPriceBig=new BigDecimal("0");
|
|
withVocherPriceBig=new BigDecimal("0");
|
|
}
|
|
}
|
|
//查看是否有折扣
|
|
//查看是否有折扣
|
|
@@ -137,6 +137,7 @@ public class OrderService extends ServiceImpl<OrderMapper, Order> {
|
|
|
|
|
|
System.out.println("折扣"+discontBig);
|
|
System.out.println("折扣"+discontBig);
|
|
Double truePrice=truePriceBig.doubleValue();
|
|
Double truePrice=truePriceBig.doubleValue();
|
|
|
|
+ System.out.println("总价"+truePrice);
|
|
if(!truePrice.equals(price)){
|
|
if(!truePrice.equals(price)){
|
|
throw new BusinessException(ExceptionEnum.BUSINESS_ERROR,"价格错误");
|
|
throw new BusinessException(ExceptionEnum.BUSINESS_ERROR,"价格错误");
|
|
}
|
|
}
|