|
@@ -1067,7 +1067,11 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
BigDecimal orderMoney = renewOrderDon.getMoney().add(Optional.ofNullable(renewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
|
|
BigDecimal orderMoney = renewOrderDon.getMoney().add(Optional.ofNullable(renewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
|
|
|
GoodsDonSku presentSku = skuMapper.selectById(renewSkuId);
|
|
GoodsDonSku presentSku = skuMapper.selectById(renewSkuId);
|
|
|
if (orderMoney.compareTo(BigDecimal.ZERO) == 0) {
|
|
if (orderMoney.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- orderMoney = presentSku.getPrice();
|
|
|
|
|
|
|
+ if (presentSku.getDays() != null) {
|
|
|
|
|
+ relationExpiryTime = DateUtil.offsetDay(relationExpiryTime, -presentSku.getDays());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ relationExpiryTime = DateUtil.offsetMonth(relationExpiryTime, -presentSku.getMonths());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
Long betweenDay = DateUtil.betweenDay(now, renewExpiryTime, false) + 1;
|
|
Long betweenDay = DateUtil.betweenDay(now, renewExpiryTime, false) + 1;
|
|
|
//当天购买的按规格原价抵扣
|
|
//当天购买的按规格原价抵扣
|
|
@@ -1097,7 +1101,12 @@ public class ClaudeCodeServiceImpl implements ClaudeCodeService {
|
|
|
GoodsDonSku thisRenewSku = skuMapper.selectById(skuId);
|
|
GoodsDonSku thisRenewSku = skuMapper.selectById(skuId);
|
|
|
BigDecimal thisOrderMoney = thisRenewOrderDon.getMoney().add(Optional.ofNullable(thisRenewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
|
|
BigDecimal thisOrderMoney = thisRenewOrderDon.getMoney().add(Optional.ofNullable(thisRenewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
|
|
|
if (thisOrderMoney.compareTo(BigDecimal.ZERO) == 0) {
|
|
if (thisOrderMoney.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- thisOrderMoney = thisRenewSku.getPrice();
|
|
|
|
|
|
|
+ if (presentSku.getDays() != null) {
|
|
|
|
|
+ relationExpiryTime = DateUtil.offsetDay(relationExpiryTime, -presentSku.getDays());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ relationExpiryTime = DateUtil.offsetMonth(relationExpiryTime, -presentSku.getMonths());
|
|
|
|
|
+ }
|
|
|
|
|
+ continue;
|
|
|
}
|
|
}
|
|
|
//当天购买的按规格原价抵扣
|
|
//当天购买的按规格原价抵扣
|
|
|
BigDecimal thisRenewDeductMoney = BigDecimal.ZERO;
|
|
BigDecimal thisRenewDeductMoney = BigDecimal.ZERO;
|