test #316

Merged
klaus merged 20 commits from test into main 2025-05-20 06:03:11 +00:00
1 changed files with 5 additions and 3 deletions
Showing only changes of commit fe84292483 - Show all commits

View File

@ -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