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

Commit 65629d08 authored by 胡佳晨's avatar 胡佳晨

店铺券修改

parent 4358b898
...@@ -545,8 +545,10 @@ public class GoblinCouponImpl implements GoblinCouponService { ...@@ -545,8 +545,10 @@ public class GoblinCouponImpl implements GoblinCouponService {
BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
if (tempPrice.compareTo(vo.getDeduction()) > 0) { if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction(); tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(contentPrice.subtract(tempPrice));
} }
returnVo.setValue(contentPrice.subtract(tempPrice));
returnVo.setCouType(vo.getType()); returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3")) {//满减 } else if (vo.getType().equals("3")) {//满减
if (vo.getValMinus().compareTo(contentPrice) > 0) { if (vo.getValMinus().compareTo(contentPrice) > 0) {
......
...@@ -262,8 +262,10 @@ public class GoblinOrderUtils { ...@@ -262,8 +262,10 @@ public class GoblinOrderUtils {
BigDecimal tempPrice = totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal tempPrice = totalPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
if (tempPrice.compareTo(vo.getDeduction()) > 0) { if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction(); tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(totalPrice.subtract(tempPrice));
} }
returnVo.setValue(totalPrice.subtract(tempPrice));
returnVo.setCouType(vo.getType()); returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3") && vo.getTriggers().compareTo(totalPrice) <= 0) {//满减 } else if (vo.getType().equals("3") && vo.getTriggers().compareTo(totalPrice) <= 0) {//满减
returnVo.setValue(vo.getValMinus()); returnVo.setValue(vo.getValMinus());
...@@ -306,8 +308,10 @@ public class GoblinOrderUtils { ...@@ -306,8 +308,10 @@ public class GoblinOrderUtils {
BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal tempPrice = contentPrice.multiply(vo.getDiscount()).setScale(2, BigDecimal.ROUND_HALF_UP);
if (tempPrice.compareTo(vo.getDeduction()) > 0) { if (tempPrice.compareTo(vo.getDeduction()) > 0) {
tempPrice = vo.getDeduction(); tempPrice = vo.getDeduction();
returnVo.setValue(tempPrice);
} else {
returnVo.setValue(totalPrice.subtract(tempPrice));
} }
returnVo.setValue(contentPrice.subtract(tempPrice));
returnVo.setCouType(vo.getType()); returnVo.setCouType(vo.getType());
} else if (vo.getType().equals("3")) {//满减 } else if (vo.getType().equals("3")) {//满减
if (vo.getValMinus().compareTo(contentPrice) > 0) { 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