Skip to content

Commit 0f0fad7

Browse files
committed
feat: 킵 취소 점수 일괄 회수를 위한 revokeForKeep 오버로드 추가
1 parent 9e9c531 commit 0f0fad7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/back/domain/user/service/AbvScoreService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ public void revokeForKeep(Long userId) {
5858
addScore(userId, -KEEP_SCORE);
5959
}
6060

61+
@Transactional
62+
public void revokeForKeep(Long userId, int count) {
63+
if (count <= 0) {
64+
return;
65+
}
66+
addScore(userId, -KEEP_SCORE * count);
67+
}
68+
6169
private void addScore(Long userId, double delta) {
6270
User user = userRepository.findById(userId)
6371
.orElseThrow(() -> new ServiceException(404, "사용자를 찾을 수 없습니다."));

0 commit comments

Comments
 (0)