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

Commit 0225b56f authored by 胡佳晨's avatar 胡佳晨

修改 平台券

parent 91ea8de6
...@@ -115,7 +115,27 @@ public class GoblinOrderUtils { ...@@ -115,7 +115,27 @@ public class GoblinOrderUtils {
voucher = BigDecimal.valueOf(-1); voucher = BigDecimal.valueOf(-1);
break; break;
case 1: case 1:
if (targetList.size() == 0) {
targetPrice = totalPrice;
} else {
for (String targetId : targetList) {
for (GoblinOrderSku skuOrderVo : goblinOrderSkuList) {
String orderVoSpuId = skuOrderVo.getSpuId();
String pre = GoblinStatusConst.MarketPreStatus.getPre(orderVoSpuId);
if(pre!=null){
orderVoSpuId = orderVoSpuId.split(pre)[0];
}
if (targetId.equals(orderVoSpuId)) {
targetPrice = targetPrice.add(skuOrderVo.getSkuPriceActual());
}
}
}
}
if(targetPrice.compareTo(value)>=0) {
voucher = voucher.add(value); voucher = voucher.add(value);
}else{
voucher = voucher.add(targetPrice);
}
break; break;
case 2://满减 case 2://满减
if (targetList.size() == 0) { if (targetList.size() == 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