test #316
|
@ -54,11 +54,13 @@ class UserActionService(
|
|||
todayAt15
|
||||
}
|
||||
|
||||
val isValidPolicyTypeDailyAndDailyStartDateAfterPolicyStartDate =
|
||||
policyType == PolicyType.DAILY && policyTypeDailyStartDate >= policy.startDate
|
||||
val order = if (contentId != null) {
|
||||
orderRepository.findByMemberIdAndContentId(
|
||||
memberId = memberId,
|
||||
contentId = contentId,
|
||||
createdAt = if (policyType == PolicyType.DAILY) {
|
||||
createdAt = if (isValidPolicyTypeDailyAndDailyStartDateAfterPolicyStartDate) {
|
||||
policyTypeDailyStartDate
|
||||
} else {
|
||||
policy.startDate
|
||||
|
@ -72,7 +74,7 @@ class UserActionService(
|
|||
val actionCount = repository.countByMemberIdAndActionTypeAndCreatedAtBetween(
|
||||
memberId = memberId,
|
||||
actionType = actionType,
|
||||
startDate = if (policyType == PolicyType.DAILY) {
|
||||
startDate = if (isValidPolicyTypeDailyAndDailyStartDateAfterPolicyStartDate) {
|
||||
policyTypeDailyStartDate
|
||||
} else {
|
||||
policy.startDate
|
||||
|
@ -84,7 +86,7 @@ class UserActionService(
|
|||
val grantedCount = grantLogRepository.countByMemberIdAndPolicyIdAndStartDate(
|
||||
memberId,
|
||||
policy.id!!,
|
||||
startDate = if (policyType == PolicyType.DAILY) {
|
||||
startDate = if (isValidPolicyTypeDailyAndDailyStartDateAfterPolicyStartDate) {
|
||||
policyTypeDailyStartDate
|
||||
} else {
|
||||
policy.startDate
|
||||
|
|
Loading…
Reference in New Issue