-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
bff63c3
commit 3550d40
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
api/src/main/kotlin/com/few/api/domain/member/subscription/MemberSubscriptionService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.few.api.domain.member.subscription | ||
|
||
import com.few.api.domain.member.subscription.dto.DeleteSubscriptionDto | ||
import com.few.api.repo.dao.subscription.SubscriptionDao | ||
import com.few.api.repo.dao.subscription.command.UpdateDeletedAtInAllSubscriptionCommand | ||
import org.springframework.stereotype.Service | ||
import org.springframework.transaction.annotation.Transactional | ||
|
||
@Service | ||
class MemberSubscriptionService( | ||
private val subscriptionDao: SubscriptionDao, | ||
) { | ||
|
||
@Transactional | ||
fun deleteSubscription(dto: DeleteSubscriptionDto) { | ||
subscriptionDao.updateDeletedAtInAllSubscription( | ||
UpdateDeletedAtInAllSubscriptionCommand( | ||
memberId = dto.memberId, | ||
opinion = dto.opinion | ||
) | ||
) | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
api/src/main/kotlin/com/few/api/domain/member/subscription/dto/DeleteSubscriptionDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.few.api.domain.member.subscription.dto | ||
|
||
data class DeleteSubscriptionDto( | ||
val memberId: Long, | ||
val opinion: String = "withdrawal", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters