记得上下班打卡 | git大法好,push需谨慎

Commit b9fe421f authored by 胡佳晨's avatar 胡佳晨

修改券

parent 3e0551e7
......@@ -542,13 +542,11 @@ public class GoblinCouponImpl implements GoblinCouponService {
}
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("2")) {//折扣
BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal tempPrice = contentPrice.subtract(contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(contentPrice.subtract(tempPrice));
}
returnVo.setValue(tempPrice);
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3")) {//满减
if (vo.getValMinus().compareTo(contentPrice) > 0) {
......
......@@ -259,13 +259,11 @@ public class GoblinOrderUtils {
returnVo.setValue(vo.getValFace());
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("2")) {//折扣
BigDecimal tempPrice = totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal tempPrice = totalPrice.subtract(totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(totalPrice.subtract(tempPrice));
}
returnVo.setValue(tempPrice);
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3") && vo.getTriggers().compareTo(totalPrice) <= 0) {//满减
returnVo.setValue(vo.getValMinus());
......@@ -305,13 +303,11 @@ public class GoblinOrderUtils {
}
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("2")) {//折扣
BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal tempPrice = contentPrice.subtract(contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP));
if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(totalPrice.subtract(tempPrice));
}
returnVo.setValue(tempPrice);
returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3")) {//满减
if (vo.getValMinus().compareTo(contentPrice) > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment