|
|
@@ -222,7 +222,7 @@ public class VipFrontServiceImpl implements VipFrontService {
|
|
|
deductMoney = deductMoney.add(getGeneralRemainNumDeductMoney(relationId, goodsId, skuId, userIdList, relation.getStartTime()));
|
|
|
} else if (goodsId == Constant.MIDJOURNEY_GOODS_ID) {
|
|
|
//mj
|
|
|
- deductMoney = deductMoney.add(getMjRemainNumDeductMoney(relationId, skuId, userIdList, relation.getStartTime()));
|
|
|
+ deductMoney = deductMoney.add(getMjRemainNumDeductMoney(relationId, skuId, userIdList, relation.getStartTime(), relation.getExpiryTime()));
|
|
|
} else {
|
|
|
//该车票抵扣金额
|
|
|
deductMoney = deductMoney.add(getDeductMoneyFromTicket(relationId, userIdList, skuId, now, relation.getStartTime(), relationExpiryTime));
|
|
|
@@ -491,7 +491,7 @@ public class VipFrontServiceImpl implements VipFrontService {
|
|
|
/**
|
|
|
* 获取mj剩余次数可抵扣金额
|
|
|
*/
|
|
|
- private BigDecimal getMjRemainNumDeductMoney(Long relationId, Long skuId, List<Long> userIdList, Date relationStartTime) {
|
|
|
+ private BigDecimal getMjRemainNumDeductMoney(Long relationId, Long skuId, List<Long> userIdList, Date relationStartTime, Date relationExpiryTime) {
|
|
|
BigDecimal deductMoney = BigDecimal.ZERO;
|
|
|
BigDecimal orderTotalMoney = BigDecimal.ZERO;
|
|
|
//总次数
|
|
|
@@ -554,7 +554,7 @@ public class VipFrontServiceImpl implements VipFrontService {
|
|
|
//消耗的次数当月 值多少钱
|
|
|
BigDecimal consumeMoney = consumeRate.multiply(single.multiply(BigDecimal.valueOf(30)));
|
|
|
//该车票多长时间
|
|
|
- Long thisDeductBetweenDay = DateUtil.betweenDay(now, relationStartTime, false) + 1;
|
|
|
+ Long thisDeductBetweenDay = DateUtil.betweenDay(now, relationExpiryTime, false) + 1;
|
|
|
//该车票抵扣金额
|
|
|
BigDecimal orderRemainMoney = single.multiply(BigDecimal.valueOf(thisDeductBetweenDay));
|
|
|
//最终可抵扣
|