@@ -0,0 +1,52 @@
+package com.doubleowner.revibe.domain.point;
+
+import com.doubleowner.revibe.domain.user.entity.User;
+import com.doubleowner.revibe.domain.user.repository.UserRepository;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+@Service
+@RequiredArgsConstructor
+public class PointService {
+    private final UserRepository userRepository;
+
+    @Transactional
+    public void addReviewPoint(User user, String image) {
+        int point = PointPolicy.TEXT_ONLY_POINT.getPoint();
+        if (image != null) {
+            point = PointPolicy.TEXT_IMAGE_POINT.getPoint();
+        }
+        User findUser = userRepository.findByEmailOrElseThrow(user.getEmail());
+        findUser.addPoint(point);
+
+
+    }
+
+    @Transactional
+    public void handlePoint(User user, String preImage, MultipartFile afterImage) {
+
+        int pointChange = 0;
+        if (preImage != null && afterImage == null) {
+            pointChange = PointPolicy.TEXT_ONLY_POINT.getPoint() - PointPolicy.TEXT_IMAGE_POINT.getPoint();
+        } else if (preImage == null && afterImage != null) {
+            pointChange = PointPolicy.TEXT_IMAGE_POINT.getPoint() - PointPolicy.TEXT_ONLY_POINT.getPoint();
+        }
+        if (pointChange != 0) {
+            User findUser = userRepository.findByEmailOrElseThrow(user.getEmail());
+            findUser.addPoint(pointChange);
+        }
+    }
+
+    @Transactional
+    public void deletePoint(User user, String image) {
+        int point = (image != null)
+                ? PointPolicy.TEXT_IMAGE_POINT.getPoint()
+                : PointPolicy.TEXT_ONLY_POINT.getPoint();
+
+        User findUser = userRepository.findByEmailOrElseThrow(user.getEmail());
+        findUser.addPoint(-point);  // 포인트 차감
+    }
+}
+

리뷰: _:hammer_and_wrench: Refactor suggestion_

**포인트 적립 로직 개선 필요**

포인트 적립 로직에 대한 개선사항을 제안드립니다:

1. null 체크가 불충분합니다.
2. 사용자 조회와 포인트 적립이 분리되어 있지 않습니다.

다음과 같이 개선해보시는 것은 어떨까요:

```diff
 @Transactional
 public void addReviewPoint(User user, String image) {
+    if (user == null) {
+        throw new IllegalArgumentException("사용자 정보가 없습니다.");
+    }
     int point = PointPolicy.TEXT_ONLY_POINT.getPoint();
     if (image != null) {
         point = PointPolicy.TEXT_IMAGE_POINT.getPoint();
     }
     User findUser = userRepository.findByEmailOrElseThrow(user.getEmail());
     findUser.addPoint(point);
-

 }
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
    @Transactional
    public void addReviewPoint(User user, String image) {
        if (user == null) {
            throw new IllegalArgumentException("사용자 정보가 없습니다.");
        }
        int point = PointPolicy.TEXT_ONLY_POINT.getPoint();
        if (image != null) {
            point = PointPolicy.TEXT_IMAGE_POINT.getPoint();
        }
        User findUser = userRepository.findByEmailOrElseThrow(user.getEmail());
        findUser.addPoint(point);
    }
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->