zoujiajian 10 månader sedan
förälder
incheckning
c97201d78e

+ 4 - 11
netflix-service/src/main/java/com/cyksj/service/claude/impl/ClaudeCodeServiceImpl.java

@@ -1067,11 +1067,8 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 			BigDecimal orderMoney = renewOrderDon.getMoney().add(Optional.ofNullable(renewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
 			GoodsDonSku presentSku = skuMapper.selectById(renewSkuId);
 			if (orderMoney.compareTo(BigDecimal.ZERO) == 0) {
-				if (presentSku.getDays() != null) {
-					relationExpiryTime = DateUtil.offsetDay(relationExpiryTime, -presentSku.getDays());
-				} else {
-					relationExpiryTime = DateUtil.offsetMonth(relationExpiryTime, -presentSku.getMonths());
-				}
+				//存在升级后的0元订单 即兑换码订单 不让抵扣
+				return BigDecimal.ZERO;
 			} else {
 				Long betweenDay = DateUtil.betweenDay(now, renewExpiryTime, false) + 1;
 				//当天购买的按规格原价抵扣
@@ -1102,12 +1099,8 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
 				GoodsDonSku thisRenewSku = skuMapper.selectById(skuId);
 				BigDecimal thisOrderMoney = thisRenewOrderDon.getMoney().add(Optional.ofNullable(thisRenewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
 				if (thisOrderMoney.compareTo(BigDecimal.ZERO) == 0) {
-					if (presentSku.getDays() != null) {
-						relationExpiryTime = DateUtil.offsetDay(relationExpiryTime, -presentSku.getDays());
-					} else {
-						relationExpiryTime = DateUtil.offsetMonth(relationExpiryTime, -presentSku.getMonths());
-					}
-					continue;
+					//存在升级后的0元订单 即兑换码订单 不让抵扣
+					return BigDecimal.ZERO;
 				}
 				//当天购买的按规格原价抵扣
 				BigDecimal thisRenewDeductMoney = BigDecimal.ZERO;