|
@@ -1333,7 +1333,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
state = 3;
|
|
state = 3;
|
|
|
}
|
|
}
|
|
|
//如果账号下架了 直接失败
|
|
//如果账号下架了 直接失败
|
|
|
- if (StrUtil.equals(GroupsTrips.Status.down.name(), renewalView.getGroupsStatus()) && renewalView.getSkuNum() > 1) {
|
|
|
|
|
|
|
+ if (renewalView.getDays() == null && StrUtil.equals(GroupsTrips.Status.down.name(), renewalView.getGroupsStatus()) && renewalView.getSkuNum() > 1) {
|
|
|
state = 3;
|
|
state = 3;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1392,7 +1392,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
//车队是否已下架
|
|
//车队是否已下架
|
|
|
GroupsRelation relation = groupsRelationMapper.selectById(relationId);
|
|
GroupsRelation relation = groupsRelationMapper.selectById(relationId);
|
|
|
GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
GroupsTrips groupsTrips = groupsMapper.selectById(relation.getGroupsId());
|
|
|
- if (groupsTrips != null && groupsTrips.getStatus() == GroupsTrips.Status.down) {
|
|
|
|
|
|
|
+ GoodsDonSku sku = goodsDonSkuMapper.selectById(groupsTrips.getSkuId());
|
|
|
|
|
+ if (groupsTrips != null && sku.getDays() == null && groupsTrips.getStatus() == GroupsTrips.Status.down) {
|
|
|
state = 3;
|
|
state = 3;
|
|
|
//下架 异常
|
|
//下架 异常
|
|
|
if (netflixUseAccountStatusRecord != null) {
|
|
if (netflixUseAccountStatusRecord != null) {
|
|
@@ -1895,7 +1896,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
refundInfoResp.setIsRefund(false);
|
|
refundInfoResp.setIsRefund(false);
|
|
|
}
|
|
}
|
|
|
//每天单价
|
|
//每天单价
|
|
|
- BigDecimal dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getMonths() * 30), RoundingMode.DOWN);
|
|
|
|
|
|
|
+ BigDecimal dayPrice;
|
|
|
|
|
+ if (sku.getDays() != null) {
|
|
|
|
|
+ dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getDays()), RoundingMode.DOWN);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getMonths() * 30), RoundingMode.DOWN);
|
|
|
|
|
+ }
|
|
|
//需要退款金额
|
|
//需要退款金额
|
|
|
BigDecimal refundMoney = dayPrice.multiply(BigDecimal.valueOf(betweenDay));
|
|
BigDecimal refundMoney = dayPrice.multiply(BigDecimal.valueOf(betweenDay));
|
|
|
refundInfoResp.setPrice(refundMoney);
|
|
refundInfoResp.setPrice(refundMoney);
|
|
@@ -1940,7 +1946,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
throw BusinessRuntimeException.getInstance("不符合退款条件");
|
|
throw BusinessRuntimeException.getInstance("不符合退款条件");
|
|
|
}
|
|
}
|
|
|
//每天单价
|
|
//每天单价
|
|
|
- BigDecimal dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getMonths() * 30), RoundingMode.DOWN);
|
|
|
|
|
|
|
+ BigDecimal dayPrice;
|
|
|
|
|
+ if (sku.getDays() != null) {
|
|
|
|
|
+ dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getDays()), RoundingMode.DOWN);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ dayPrice = sku.getPrice().divide(BigDecimal.valueOf(sku.getMonths() * 30), RoundingMode.DOWN);
|
|
|
|
|
+ }
|
|
|
//需要退款金额
|
|
//需要退款金额
|
|
|
BigDecimal refundMoney = dayPrice.multiply(BigDecimal.valueOf(betweenDay));
|
|
BigDecimal refundMoney = dayPrice.multiply(BigDecimal.valueOf(betweenDay));
|
|
|
if (refundMoney.compareTo(orderMoney) > 0) {
|
|
if (refundMoney.compareTo(orderMoney) > 0) {
|