diff --git a/src/main/java/org/sopt/app/application/soptamp/SoptampPointService.java b/src/main/java/org/sopt/app/application/soptamp/SoptampPointService.java index bda2249e..5f5a0995 100644 --- a/src/main/java/org/sopt/app/application/soptamp/SoptampPointService.java +++ b/src/main/java/org/sopt/app/application/soptamp/SoptampPointService.java @@ -55,8 +55,7 @@ public List findCurrentPointListBySoptampUserIds(List soptampUserId @Transactional public void addPoint(Long soptampUserId, Integer level) { val soptampPoint = soptampPointRepository.findBySoptampUserIdAndGeneration(soptampUserId, currentGeneration); - if(soptampPoint.isPresent()){ - + if (soptampPoint.isPresent()) { val soptampPointEntity = soptampPoint.get(); val newSoptampPoint = SoptampPoint.builder() .id(soptampPointEntity.getId()) @@ -71,8 +70,7 @@ public void addPoint(Long soptampUserId, Integer level) { @Transactional public void subtractPoint(Long soptampUserId, Integer level) { val soptampPoint = soptampPointRepository.findBySoptampUserIdAndGeneration(soptampUserId, currentGeneration); - if(soptampPoint.isEmpty()){ - + if (soptampPoint.isEmpty()) { return; } val soptampPointEntity = soptampPoint.get(); @@ -115,6 +113,7 @@ public void initPoint(Long soptampUserId) { .soptampUserId(soptampPointEntity.getSoptampUserId()) .points(0L) .build(); + soptampPointRepository.save(newSoptampPoint); }