|
|
|
@ -80,11 +80,11 @@ public class RightApplicationService { |
|
|
|
oldSpecPeriodRight = rightQueryService.getEnableRight(order.getUserId(), order.getMiId(), RightTypeEnum.VIP, RightUnitEnum.SPEC_PERIOD); |
|
|
|
if (Objects.nonNull(oldSpecPeriodRight)) { |
|
|
|
right.setId(oldSpecPeriodRight.getId()); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
oldSpecPeriodRight = rightQueryService.getEnableRight(order.getUserId(), order.getMiId(), RightTypeEnum.VIP_TRIAL, RightUnitEnum.SPEC_PERIOD); |
|
|
|
if (Objects.nonNull(oldSpecPeriodRight)) { |
|
|
|
right.setId(oldSpecPeriodRight.getId()); |
|
|
|
if (RightTypeEnum.VIP.equals(type)){ |
|
|
|
if (RightTypeEnum.VIP.equals(type)) { |
|
|
|
right.setType(RightTypeEnum.VIP); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -159,7 +159,7 @@ public class RightApplicationService { |
|
|
|
private LocalDateTime handleValidity(LocalDateTime startTime, List<ProductSpecTerm> productSpecTermList) { |
|
|
|
LocalDateTime endTime = null; |
|
|
|
ProductSpecTerm term = productQueryService.getTermByName(productSpecTermList, ProductSpecTermNameEnum.VALIDITY_PERIOD); |
|
|
|
if (Objects.nonNull(term)) { |
|
|
|
if (Objects.nonNull(term) && !term.getValue().equals("-1")) { |
|
|
|
int validityDays = Integer.parseInt(term.getValue()); |
|
|
|
endTime = startTime.plusDays(validityDays); |
|
|
|
} |
|
|
|
|