diff --git a/README.md b/README.md
index fb773c3c..550eab9c 100644
--- a/README.md
+++ b/README.md
@@ -2,36 +2,88 @@
> ๐ SOPT ๊ณต์ ์ฑ์ผ๋ก, ์ถ์/๊ณต์ง/๋คํธ์ํน ๋ฏธ์
๋ฑ ๋ค์ํ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
-## 1.์ํฌํ : ๋คํธ์ํน ๋ฏธ์
+![image](https://github.com/sopt-makers/sopt-backend/assets/63996052/e00e6014-04c4-4da5-81ec-85ab6b2a270b)
+
+# PRODUCT
+### [1๊ธฐ] ์ํฌํ : ๋คํธ์ํน ๋ฏธ์
์ํธ ๋คํธ์ํน์ ํ์ฑํ์ํค๊ธฐ ์ํด ์คํฌํ ๋ฏธ์
๋ฐ ์ธ์ฆ ํ๋ซํผ ์ ๊ณต
+### [2๊ธฐ] ๊ณต์์ฑ : ์ถ์/๊ณต์ง/๋ฉ์ด์ปค์ค
-## 2. ํ๋ก์ ํธ ์ค์น
-- java version: 17
-- springboot: 2.7.4 (3์ ๋๋ก ์ฌ๋ฆฌ๋ ๊ฒ ์ถ์ฒ)
-
-### Quick start
-> local ์์ docker postgres ๋ฅผ ์ฐ์ ์คํํด์ผํฉ๋๋ค. [ wiki ์ฐธ๊ณ ](https://github.com/sopt-makers/app-server/wiki/Local์์-Docker-postgres-์คํํ๋-๋ฒ)
-```
-git clone https://github.com/sopt-makers/app-server.git
-
-./gradlew clean build
+ํ๋ ๊ธฐ์๋ฅผ ์ํ ์ถ์/๊ณต์ง ๊ธฐ๋ฅ๊ณผ ๋ฉ์ด์ปค์ค ํ๋ก๋ํธ ๋งํฌ ์ ๊ณต
-java -jar -Dspring.profiles.active=local build/libs/app-server-0.0.1-SNAPSHOT.jar
+
-```
-http://localhost:8080 ์ผ๋ก ์ ์ ๊ฐ๋ฅํฉ๋๋ค.
+# PROJECT
+- java version: 17
+- springboot: 2.7.4
-## 3. ๋ถ๋ก
+# DEPLOY
+- [local] deploy
+ - docker postgres ์คํ
+ - git clone https://github.com/sopt-makers/app-server.git (์ต์ด ์คํ)
+ - ./gradlew clean build
+ - java -jar -Dspring.profiles.active=local build/libs/app-server-0.0.1-SNAPSHOT.jar
+ - http://localhost:8080
+- [dev] deploy
+ - dev ์๋ฒ ์ ์
+ - git pull origin dev
+ - ./gradlew clean build
+ - java -jar -Dspring.profiles.active=local build/libs/app-server-0.0.1-SNAPSHOT.jar
+ - https://app.dev.sopt.org
+- [main] github actions
+ - ๋ฐฐํฌ ์กฐ๊ฑด: main branch์ merge ๋๊ฑฐ๋, makers-app-develop ํ๊ทธ ๋น๋ํ๋ ๊ฒฝ์ฐ
+ - gradle build -> s3 ์ jar ์
๋ก๋ -> codedeploy ๋ฐฐํฌ
+ - https://app.sopt.org
-3-1. github actions
+# FOLDERING
-๋ฐฐํฌ ์กฐ๊ฑด: main branch์ merge ๋๊ฑฐ๋, makers-app-develop ํ๊ทธ ๋น๋ํ๋ ๊ฒฝ์ฐ
-- gradle build -> s3 ์ jar ์
๋ก๋ -> codedeploy ๋ฐฐํฌ
+```tsx
+app-server
+โ .gitignore
+โ appspec.yml
+โ build.gradle
+โ gradlew
+โ gradlew.bat
+โ README.md
+โ settings.gradle
+โ
+โโsrc/main
+ โ
+ โโjava/org/sopt/app
+ โ โ AppApplication
+ โ โโapplication
+ โ โโcommon
+ โ โโdomain
+ โ โโinterfaces.postgres
+ โ โโpresentation
+ โ
+ โโresources
+ โ application.yml
+ โ application-local.yml
+ โ application-prod.yml
+ โโdatabase
+```
-3-2. API ๋ฌธ์ [๋ฐ๋ก๊ฐ๊ธฐ](https://parangjy.notion.site/166132ae964d4bc483c71e507497bb9c)
+# SECRETS
+- ์ธ์์ธ๊ณ ๋ด๋น์์๊ฒ ์๋ ํญ๋ชฉ๋ค์ ์์ฒญํด์ฃผ์ธ์! (2๊ธฐ [ozzing](https://github.com/ozzing))
+ - application-prod.yml
+ - application-local.yml
+ - prod database info
+ - dev database info
+ - prod pem key
+ - dev pem key
+- AWS ๊ด๋ จ ๊ถํ์ ํ ๊ธฐ์ AWS ๋ด๋น์์๊ฒ ์ ์ ํ ๊ถํ์ ์์ฒญํด์ฃผ์ธ์!
+ - ex) s3 access key, secret key
+- ์ด ์ธ์๋ ํ์ํ ํญ๋ชฉ์ด ์์ผ๋ฉด ์์ฒญํด์ฃผ์ธ์!
-3-3. ์ ์ค์ผ์ด์ค [๋ฐ๋ก๊ฐ๊ธฐ](https://github.com/sopt-makers/app-server/wiki/์ํฌํ-ํ๋ก์ ํธ-์ ์ค์ผ์ด์ค)
\ No newline at end of file
+# ETC
+- Playground OAuth [๋ฐ๋ก๊ฐ๊ธฐ](https://www.notion.so/parangjy/3596d3abc6304004a07d1fc79981d8bc)
+- docker postgres ์คํ ๋ฐฉ๋ฒ [๋ฐ๋ก๊ฐ๊ธฐ](https://github.com/sopt-makers/app-server/wiki/Local์์-Docker-postgres-์คํํ๋-๋ฒ)
+- 2๊ธฐ Swagger [๋ฐ๋ก๊ฐ๊ธฐ](https://app.dev.sopt.org/swagger-ui/index.html)
+- 2๊ธฐ API ๋ฌธ์ [๋ฐ๋ก๊ฐ๊ธฐ](https://parangjy.notion.site/3278da92a8f646aea4eba1d0f5a45f43?v=15ca2103aaec4bbaaaea7808c872484c)
+- 1๊ธฐ ์ํฌํ ์ ์ค์ผ์ด์ค [๋ฐ๋ก๊ฐ๊ธฐ](https://github.com/sopt-makers/app-server/wiki/์ํฌํ-ํ๋ก์ ํธ-์ ์ค์ผ์ด์ค)
+- 1๊ธฐ API ๋ฌธ์ [๋ฐ๋ก๊ฐ๊ธฐ](https://parangjy.notion.site/166132ae964d4bc483c71e507497bb9c)
diff --git a/src/main/java/org/sopt/app/v1/application/auth/AuthUseCaseImpl.java b/src/main/java/org/sopt/app/v1/application/auth/AuthUseCaseImpl.java
deleted file mode 100644
index a6a56a75..00000000
--- a/src/main/java/org/sopt/app/v1/application/auth/AuthUseCaseImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.sopt.app.v1.application.auth;
-
-import java.util.Optional;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.common.exception.v1.DbException;
-import org.sopt.app.common.exception.v1.ExistUserException;
-import org.sopt.app.common.exception.v1.UserNotFoundException;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.interfaces.postgres.UserRepositoryV1;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@RequiredArgsConstructor
-public class AuthUseCaseImpl {
-
- private final UserRepositoryV1 userRepositoryV1;
- private final EncryptService encryptService;
-
- public void validate(String nickname, String email) {
- if (nickname != null) {
- validateNickname(nickname);
- }
- if (email != null) {
- validateEmail(email);
- }
- }
-
- @Transactional
- public void changePassword(String userId, String password) {
- User user = userRepositoryV1.findUserById(Long.parseLong(userId)).orElseThrow();
- user.password = encryptService.encode(password);
- }
-
- @Transactional
- public void changeNickname(String userId, String nickname) {
- User user = userRepositoryV1.findUserById(Long.parseLong(userId)).orElseThrow();
- user.nickname = nickname;
- }
-
- private void validateEmail(String email) throws UserNotFoundException {
- Optional user = userRepositoryV1.findUserByEmail(email);
- if (user.isPresent()) {
- throw new ExistUserException("์ด๋ฏธ ๋ฑ๋ก๋ ์ด๋ฉ์ผ์
๋๋ค.");
- }
- }
-
- private void validateNickname(String nickname) {
- Optional user = userRepositoryV1.findUserByNickname(nickname);
- if (user.isPresent()) {
- throw new ExistUserException("์ฌ์ฉ ์ค์ธ ๋๋ค์์
๋๋ค.");
- }
-
- }
-
- @Transactional
- public void deleteUser(String userId) {
- try {
- userRepositoryV1.deleteById(Long.parseLong(userId));
- } catch (Exception e) {
- throw new DbException(e);
- }
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/application/auth/EncryptService.java b/src/main/java/org/sopt/app/v1/application/auth/EncryptService.java
deleted file mode 100644
index 9bee1c39..00000000
--- a/src/main/java/org/sopt/app/v1/application/auth/EncryptService.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.sopt.app.v1.application.auth;
-
-import org.springframework.security.crypto.bcrypt.BCrypt;
-import org.springframework.security.crypto.password.PasswordEncoder;
-import org.springframework.stereotype.Component;
-
-@Component
-public class EncryptService implements PasswordEncoder {
-
- @Override
- public String encode(CharSequence rawPassword) {
- return BCrypt.hashpw(rawPassword.toString(), BCrypt.gensalt());
- }
-
- @Override
- public boolean matches(CharSequence rawPassword, String encodedPassword) {
- return BCrypt.checkpw(rawPassword.toString(), encodedPassword);
- }
-}
\ No newline at end of file
diff --git a/src/main/java/org/sopt/app/v1/application/mission/MissionServiceV1.java b/src/main/java/org/sopt/app/v1/application/mission/MissionServiceV1.java
deleted file mode 100644
index 714aac56..00000000
--- a/src/main/java/org/sopt/app/v1/application/mission/MissionServiceV1.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.sopt.app.v1.application.mission;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.domain.entity.Mission;
-import org.sopt.app.domain.entity.Stamp;
-import org.sopt.app.v1.interfaces.postgres.MissionRepositoryV1;
-import org.sopt.app.v1.interfaces.postgres.StampRepositoryV1;
-import org.sopt.app.v1.presentation.mission.dto.GetAllMissionResponseDto;
-import org.sopt.app.v1.presentation.mission.dto.MissionRequestDto;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@RequiredArgsConstructor
-public class MissionServiceV1 {
-
- private final MissionRepositoryV1 missionRepositoryV1;
- private final StampRepositoryV1 stampRepositoryV1;
-
-
- public List findAllMission(String userId) {
- List completedStamps = stampRepositoryV1.findAllByUserId(Long.parseLong(userId));
- List missions = missionRepositoryV1.findAll();
- return missions.stream()
- .map(mission ->
- GetAllMissionResponseDto.builder()
- .id(mission.getId())
- .title(mission.getTitle())
- .level(mission.getLevel())
- .profileImage(mission.getProfileImage())
- .isCompleted(isCompletedMission(mission.getId(), completedStamps))
- .build())
- .sorted(Comparator.comparing(GetAllMissionResponseDto::getLevel))
- .collect(Collectors.toList());
- }
-
- private Boolean isCompletedMission(Long missionId, List completedStamps) {
- return completedStamps.stream().anyMatch(
- stamp -> stamp.getMissionId().equals(missionId));
- }
-
-
- // ๊ฒ์๊ธ ์์ฑ - ์ด๋ฏธ์ง ๋ฏธํฌํจ
- @Transactional
- public Mission uploadMission(MissionRequestDto missionRequestDto) {
- Mission mission = this.convertMission(missionRequestDto);
- return missionRepositoryV1.save(mission);
- }
-
- // ๊ฒ์๊ธ ์์ฑ - ์ด๋ฏธ์ง ํฌํจ
- @Transactional
- public Mission uploadMissionWithImg(MissionRequestDto missionRequestDto, List imgPaths) {
-
- List imgList = new ArrayList<>(imgPaths);
- Mission mission = this.convertMissionImg(missionRequestDto, imgList);
- return missionRepositoryV1.save(mission);
-
- }
-
-
- //Mission ์๋ฃํ ๋ฏธ์
๋ง ๋ถ๋ฌ์ค๊ธฐ
- @Transactional
- public List getCompleteMission(String userId) {
-
- //ํค๋์์ ๋ฐ์ userId๋ก Stamp ํ
์ด๋ธ์์ ๋ฌ์ฑํ ๋ฏธ์
๋ฒํธ ๊ฐ์ ธ์ค๊ธฐ
- List stampList = stampRepositoryV1.findAllByUserId(Long.valueOf(userId));
-
- //๋ฌ์ฑํ ๋ฏธ์
๋ฒํธ๋ฆฌ์คํธ
- List missionIdList = new ArrayList<>();
- for (Stamp stamp : stampList) {
- missionIdList.add(stamp.getMissionId());
- }
-
- return missionRepositoryV1.findMissionIn(missionIdList);
- }
-
-// private void getCompleteMission(List stampList, Mission mission) {
-//
-// mission.
-//
-//
-//// coupon.updateUseCoupon(
-//// couponUsedCommand
-//// .getCpnNoList()
-//// .stream()
-//// .filter((CouponUsed command) ->
-//// command.getCouponNumber().equals(coupon.getCouponId()))
-//// .findAny().orElseThrow(IllegalArgumentException::new));
-// }
-
- /**
- * ๋ฏธ์๋ฃ ๋ฏธ์
๋ง ๋ถ๋ฌ์ค๊ธฐ
- */
- @Transactional
- public List getIncompleteMission(String userId) {
-
- //์ ์ฒด ๋ฏธ์
์กฐํํ๊ธฐ
- List missionList = missionRepositoryV1.findAll();
- List allMissionList = new ArrayList<>();
- for (Mission mission : missionList) {
- allMissionList.add(mission.getId());
- }
-
- //stamp์์ userId๋ก ๋ฌ์ฑํ mission ์กฐํํ๊ธฐ
- List stampList = stampRepositoryV1.findAllByUserId(Long.valueOf(userId));
- List completeMissionIdList = new ArrayList<>();
- for (Stamp stamp : stampList) {
- completeMissionIdList.add(stamp.getMissionId());
- }
-
- //๋ ๋ฆฌ์คํธ ๋น๊ตํด์ ์ค๋ณต๊ฐ ์ ๊ฑฐ
- List inCompleteIdList = allMissionList.stream()
- .filter(all -> completeMissionIdList.stream().noneMatch(Predicate.isEqual(all)))
- .toList();
-
-// noneMatch: ์ค๋ณต X
-// anyMatch: ์ค๋ณต O
-// List oldList = Arrays.asList("1", "2", "3", "4");
-// List newList = Arrays.asList("3", "4", "5", "6");
-//
-// List resultList1 = oldList.stream()
-// .filter(old -> newList.stream().noneMatch(Predicate.isEqual(old)))
-// .collect(Collectors.toList());
-//
-// System.out.println(resultList1); // [1, 2]
-
- return missionRepositoryV1.findMissionIn(inCompleteIdList);
- }
-
-
- //Mission Entity ์์์ ๋ง๊ฒ ๋ฐ์ดํฐ ์ธํ
- private Mission convertMissionImg(MissionRequestDto missionRequestDto, List imgList) {
- return Mission.builder()
- .title(missionRequestDto.getTitle())
- .level(missionRequestDto.getLevel())
- .display(true)
- .profileImage(imgList)
- .build();
- }
-
- private Mission convertMission(MissionRequestDto missionRequestDto) {
-
- return Mission.builder()
- .title(missionRequestDto.getTitle())
- .level(missionRequestDto.getLevel())
- .display(true)
- .build();
- }
-
-}
diff --git a/src/main/java/org/sopt/app/v1/application/rank/RankServiceV1.java b/src/main/java/org/sopt/app/v1/application/rank/RankServiceV1.java
deleted file mode 100644
index 3d8c428f..00000000
--- a/src/main/java/org/sopt/app/v1/application/rank/RankServiceV1.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package org.sopt.app.v1.application.rank;
-
-import static org.sopt.app.common.ResponseCode.INVALID_RESPONSE;
-
-import java.util.Comparator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.common.exception.v1.ApiException;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.mission.MissionServiceV1;
-import org.sopt.app.v1.interfaces.postgres.UserRepositoryV1;
-import org.sopt.app.v1.presentation.rank.dto.FindAllRanksResponseDto;
-import org.sopt.app.v1.presentation.rank.dto.FindRankResponseDto;
-import org.springframework.stereotype.Service;
-
-@Service
-@RequiredArgsConstructor
-public class RankServiceV1 {
-
- private final UserRepositoryV1 userRepositoryV1;
-
- private final MissionServiceV1 missionServiceV1;
-
- //User ํ๋ง๋ ๋ฑ๋กํ๊ธฐ
- public User updateProfileMessage(Long userId, String profileMessage) {
-
- User user = userRepositoryV1.findUserById(userId)
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- user.updateProfileMessage(profileMessage);
- return userRepositoryV1.save(user);
- }
-
- public List findRanks() {
- List users = userRepositoryV1.findAll();
- AtomicInteger rankPoint = new AtomicInteger(1);
- return users.stream().sorted(
- Comparator.comparing(User::getPoints).reversed())
- .map(user -> FindAllRanksResponseDto.builder()
- .rank(rankPoint.getAndIncrement())
- .userId(user.getId())
- .nickname(user.getNickname())
- .point(user.getPoints())
- .profileMessage(user.getProfileMessage())
- .build())
- .collect(Collectors.toList());
- }
-
- public FindRankResponseDto findRankById(Long userId) {
- User user = userRepositoryV1.findUserById(userId).orElseThrow(() -> new ApiException(INVALID_RESPONSE));
- return FindRankResponseDto.builder()
- .userId(userId)
- .nickname(user.getNickname())
- .profileMessage(user.getProfileMessage())
- .userMissions(missionServiceV1.getCompleteMission(String.valueOf(userId)))
- .build();
- }
-
-}
diff --git a/src/main/java/org/sopt/app/v1/application/stamp/StampServiceV1.java b/src/main/java/org/sopt/app/v1/application/stamp/StampServiceV1.java
deleted file mode 100644
index dab19c57..00000000
--- a/src/main/java/org/sopt/app/v1/application/stamp/StampServiceV1.java
+++ /dev/null
@@ -1,151 +0,0 @@
-package org.sopt.app.v1.application.stamp;
-
-import static org.sopt.app.common.ResponseCode.DUPLICATE_STAMP;
-import static org.sopt.app.common.ResponseCode.INVALID_RESPONSE;
-
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.common.exception.v1.ApiException;
-import org.sopt.app.domain.entity.Mission;
-import org.sopt.app.domain.entity.Stamp;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.interfaces.postgres.MissionRepositoryV1;
-import org.sopt.app.v1.interfaces.postgres.StampRepositoryV1;
-import org.sopt.app.v1.interfaces.postgres.UserRepositoryV1;
-import org.sopt.app.v1.presentation.stamp.dto.StampRequestDto;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.StringUtils;
-
-@Service
-@RequiredArgsConstructor
-public class StampServiceV1 {
-
- private final StampRepositoryV1 stampRepositoryV1;
-
- private final UserRepositoryV1 userRepositoryV1;
-
- private final MissionRepositoryV1 missionRepositoryV1;
-
- public Stamp findStamp(String userId, Long missionId) {
- return stampRepositoryV1.findByUserIdAndMissionId(Long.valueOf(userId), missionId);
- }
-
- @Transactional
- public Stamp uploadStamp(StampRequestDto stampRequestDto, List imgPaths, String userId,
- Long missionId) {
- List imgList = new ArrayList<>(imgPaths);
- Stamp stamp = this.convertStampImg(stampRequestDto, imgList, userId, missionId);
-
- //๋ญํฌ ๊ด๋ จ ์ ์ ์ฒ๋ฆฌ
- User user = userRepositoryV1.findUserById(Long.valueOf(userId))
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- //๋ฏธ์
๋ญํฌ์ ์ ์์์ค๊ธฐ
- Mission mission = missionRepositoryV1.findById(missionId)
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- user.addPoints(mission.getLevel());
- userRepositoryV1.save(user);
-
- return stampRepositoryV1.save(stamp);
- }
-
- //์ฌ์ง ์์ ํ ๊ฒฝ์ฐ
- @Transactional
- public Stamp editStampWithImg(StampRequestDto stampRequestDto, List imgPaths,
- String userId,
- Long missionId) {
-
- Stamp stamp = stampRepositoryV1.findByUserIdAndMissionId(Long.valueOf(userId), missionId);
-
- if (StringUtils.hasText(stampRequestDto.getContents())) {
- stamp.changeContents(stampRequestDto.getContents());
- }
- stamp.changeImages(imgPaths);
- stamp.setUpdatedAt(LocalDateTime.now());
-
- return stampRepositoryV1.save(stamp);
- }
-
-
- //์ฌ์ง ์์ ์ํ ๊ฒฝ์ฐ
- @Transactional
- public Stamp editStampContents(StampRequestDto stampRequestDto, String userId,
- Long missionId) {
-
- Stamp stamp = stampRepositoryV1.findByUserIdAndMissionId(Long.valueOf(userId), missionId);
-
- if (StringUtils.hasText(stampRequestDto.getContents())) {
- stamp.changeContents(stampRequestDto.getContents());
- }
-
- stamp.setUpdatedAt(LocalDateTime.now());
- return stampRepositoryV1.save(stamp);
- }
-
-
- //Stamp ์ญ์ by stampId
- @Transactional
- public void deleteByStampId(Long stampId) {
-
- Stamp stamp = stampRepositoryV1.findById(stampId)
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- //๋ญํฌ ๊ด๋ จ ์ ์ ์ฒ๋ฆฌ
- User user = userRepositoryV1.findUserById(stamp.getUserId())
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- //๋ฏธ์
๋ญํฌ์ ์ ์์์ค๊ธฐ
- Mission mission = missionRepositoryV1.findById(stamp.getMissionId())
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
-
- user.minusPoints(mission.getLevel());
- userRepositoryV1.save(user);
-
- stampRepositoryV1.deleteById(stampId);
- }
-
-
- //์คํฌํ ์ค๋ณต ๊ฒ์ฌ์ฒดํฌ
- @Transactional
- public void checkDuplicateStamp(String userId, Long missionId) {
- Stamp stamp = stampRepositoryV1.findByUserIdAndMissionId(Long.valueOf(userId), missionId);
-
- if (stamp != null) {
- throw new ApiException(DUPLICATE_STAMP);
- }
- }
-
-
- //Stamp ์ญ์ All by UserId
- @Transactional
- public void deleteStampByUserId(Long userId) {
-
- //์คํฌํ ์ ๋ถ์ญ์
- stampRepositoryV1.deleteAllByUserId(userId);
-
- //ํด๋น ์คํฌํ๋ก ์ป์๋ ์ ์ ๋ชจ๋ ์ด๊ธฐํ
- User user = userRepositoryV1.findUserById(userId)
- .orElseThrow(() -> new ApiException(INVALID_RESPONSE));
- user.initializePoints();
- userRepositoryV1.save(user);
-
- }
-
-
- //Stamp Entity ์์์ ๋ง๊ฒ ๋ฐ์ดํฐ ์ธํ
- private Stamp convertStampImg(StampRequestDto stampRequestDto, List imgList,
- String userId, Long missionId) {
- return Stamp.builder()
- .contents(stampRequestDto.getContents())
- .createdAt(LocalDateTime.now())
- .images(imgList)
- .missionId(missionId)
- .userId(Long.valueOf(userId))
- .build();
- }
-
-}
diff --git a/src/main/java/org/sopt/app/v1/application/user/UserUseCase.java b/src/main/java/org/sopt/app/v1/application/user/UserUseCase.java
deleted file mode 100644
index 72c2beec..00000000
--- a/src/main/java/org/sopt/app/v1/application/user/UserUseCase.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.sopt.app.v1.application.user;
-
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.user.dto.LogInUserDto;
-import org.sopt.app.v1.application.user.dto.SignUpUserDto;
-
-public interface UserUseCase {
-
- Long signUp(SignUpUserDto userDto);
-
- User logIn(LogInUserDto userDto);
-}
diff --git a/src/main/java/org/sopt/app/v1/application/user/UserUseCaseImpl.java b/src/main/java/org/sopt/app/v1/application/user/UserUseCaseImpl.java
deleted file mode 100644
index 43bbd419..00000000
--- a/src/main/java/org/sopt/app/v1/application/user/UserUseCaseImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.sopt.app.v1.application.user;
-
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.common.exception.v1.UserNotFoundException;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.auth.EncryptService;
-import org.sopt.app.v1.application.user.dto.LogInUserDto;
-import org.sopt.app.v1.application.user.dto.SignUpUserDto;
-import org.sopt.app.v1.application.user.service.UserServiceV1;
-import org.springframework.stereotype.Component;
-
-@Component
-@RequiredArgsConstructor
-public class UserUseCaseImpl implements UserUseCase {
-
- private final UserServiceV1 userServiceV1;
- private final EncryptService encryptService;
-
- @Override
- public Long signUp(SignUpUserDto userDto) {
- String encodedPassword = encryptService.encode(userDto.getPassword());
- return userServiceV1.create(userDto, encodedPassword);
- }
-
- @Override
- public User logIn(LogInUserDto userDto) {
- User user = userServiceV1.findUserByEmail(userDto.email());
-
- boolean matches = encryptService.matches(userDto.password(), user.getPassword());
- if (!matches) {
- throw new UserNotFoundException("์์ด๋/๋น๋ฐ๋ฒํธ๋ฅผ ํ์ธํด์ฃผ์ธ์.");
- }
-
- return user;
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/application/user/dto/LogInUserDto.java b/src/main/java/org/sopt/app/v1/application/user/dto/LogInUserDto.java
deleted file mode 100644
index bcd6d5e3..00000000
--- a/src/main/java/org/sopt/app/v1/application/user/dto/LogInUserDto.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package org.sopt.app.v1.application.user.dto;
-
-
-import lombok.Builder;
-
-public record LogInUserDto(String email, String password) {
- @Builder
- public LogInUserDto {
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/application/user/dto/SignUpUserDto.java b/src/main/java/org/sopt/app/v1/application/user/dto/SignUpUserDto.java
deleted file mode 100644
index 25526f7d..00000000
--- a/src/main/java/org/sopt/app/v1/application/user/dto/SignUpUserDto.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.sopt.app.v1.application.user.dto;
-
-import lombok.Builder;
-import lombok.Getter;
-import org.sopt.app.domain.enums.OsType;
-
-@Getter
-public class SignUpUserDto {
-
- private final String nickname;
- private final String email;
- private final String password;
- private final OsType osType;
- private final String clientToken;
-
- @Builder
- public SignUpUserDto(String nickname, String email, String password, OsType osType, String clientToken) {
- this.nickname = nickname;
- this.email = email;
- this.password = password;
- this.osType = osType;
- this.clientToken = clientToken;
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/application/user/service/UserServiceV1.java b/src/main/java/org/sopt/app/v1/application/user/service/UserServiceV1.java
deleted file mode 100644
index 9b50ca9a..00000000
--- a/src/main/java/org/sopt/app/v1/application/user/service/UserServiceV1.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.sopt.app.v1.application.user.service;
-
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.common.exception.v1.UserNotFoundException;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.user.dto.SignUpUserDto;
-import org.sopt.app.v1.interfaces.postgres.UserRepositoryV1;
-import org.springframework.stereotype.Service;
-
-@Service
-@RequiredArgsConstructor
-public class UserServiceV1 {
-
- private final UserRepositoryV1 userRepositoryV1;
-
- public Long create(SignUpUserDto userDto, String password) {
- User user = userRepositoryV1.save(User.builder()
- .username("")
- .nickname(userDto.getNickname())
- .email(userDto.getEmail())
- .password(password)
- .osType(null)
- .points(0L)
- .clientToken(userDto.getClientToken())
- .build());
-
- return user.getId();
- }
-
- public User findUserByEmail(String email) throws UserNotFoundException {
- return userRepositoryV1.findUserByEmail(email)
- .orElseThrow(() -> new UserNotFoundException("์์ด๋/๋น๋ฐ๋ฒํธ๋ฅผ ํ์ธํด์ฃผ์ธ์."));
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/interfaces/postgres/MissionRepositoryV1.java b/src/main/java/org/sopt/app/v1/interfaces/postgres/MissionRepositoryV1.java
deleted file mode 100644
index e4f8add5..00000000
--- a/src/main/java/org/sopt/app/v1/interfaces/postgres/MissionRepositoryV1.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.sopt.app.v1.interfaces.postgres;
-
-import java.util.List;
-import org.sopt.app.domain.entity.Mission;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
-
-public interface MissionRepositoryV1 extends JpaRepository {
-
- @Query("select m from Mission m where m.id in :missions")
- List findMissionIn(@Param("missions") List missions);
-
-}
diff --git a/src/main/java/org/sopt/app/v1/interfaces/postgres/StampRepositoryV1.java b/src/main/java/org/sopt/app/v1/interfaces/postgres/StampRepositoryV1.java
deleted file mode 100644
index 27c35a54..00000000
--- a/src/main/java/org/sopt/app/v1/interfaces/postgres/StampRepositoryV1.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.sopt.app.v1.interfaces.postgres;
-
-import java.util.List;
-import org.sopt.app.domain.entity.Stamp;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface StampRepositoryV1 extends JpaRepository {
-
- List findAllByUserId(Long userId);
-
- Stamp findByUserIdAndMissionId(Long userId, Long missionId);
-
- void deleteAllByUserId(Long userId);
-
-}
diff --git a/src/main/java/org/sopt/app/v1/interfaces/postgres/UserRepositoryV1.java b/src/main/java/org/sopt/app/v1/interfaces/postgres/UserRepositoryV1.java
deleted file mode 100644
index 95061450..00000000
--- a/src/main/java/org/sopt/app/v1/interfaces/postgres/UserRepositoryV1.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.sopt.app.v1.interfaces.postgres;
-
-import java.util.Optional;
-import org.sopt.app.domain.entity.User;
-import org.springframework.data.jpa.repository.JpaRepository;
-
-public interface UserRepositoryV1 extends JpaRepository {
-
- Optional findUserByEmail(String email);
-
- Optional findUserByNickname(String nickname);
-
- Optional findUserById(Long userId);
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/BaseController.java b/src/main/java/org/sopt/app/v1/presentation/BaseController.java
deleted file mode 100644
index e1420082..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/BaseController.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.sopt.app.v1.presentation;
-
-import static org.sopt.app.common.ResponseCode.SUCCESS;
-import static org.sopt.app.common.constants.Constants.RESULT_CODE;
-
-import java.nio.charset.StandardCharsets;
-import lombok.AllArgsConstructor;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Controller;
-
-
-@Controller
-@AllArgsConstructor
-public class BaseController {
-
- protected HttpHeaders getSuccessHeaders() {
- HttpHeaders headers = new HttpHeaders();
- headers.setContentType(new MediaType("application", "json", StandardCharsets.UTF_8));
- headers.set(RESULT_CODE, SUCCESS.getResponseCode());
- return headers;
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/auth/AuthControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/auth/AuthControllerV1.java
deleted file mode 100644
index 136a38d1..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/auth/AuthControllerV1.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.sopt.app.v1.presentation.auth;
-
-
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.v1.application.auth.AuthUseCaseImpl;
-import org.sopt.app.v1.presentation.auth.dto.ChangeNicknameRequestDto;
-import org.sopt.app.v1.presentation.auth.dto.ChangePasswordRequestDto;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PatchMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequiredArgsConstructor
-public class AuthControllerV1 {
-
- private final AuthUseCaseImpl authUseCase;
-
- /**
- * ๋๋ค์, ์ด๋ฉ์ผ ๊ฒ์ฆ API
- */
- @GetMapping(value = "/api/v1/auth")
- public void check(@RequestParam(value = "nickname", required = false) String nickname,
- @RequestParam(value = "email", required = false) String email) {
- authUseCase.validate(nickname, email);
- }
-
- /**
- * ๋น๋ฐ๋ฒํธ ๋ณ๊ฒฝ
- */
-
- @PatchMapping(value = "/api/v1/auth/password")
- public void changePassword(
- @RequestHeader(name = "userId") String userId,
- @RequestBody ChangePasswordRequestDto changePasswordRequestDto
- ) {
- authUseCase.changePassword(userId, changePasswordRequestDto.getPassword());
- }
-
- /**
- * ๋๋ค์ ๋ณ๊ฒฝ
- */
- @PatchMapping(value = "/api/v1/auth/nickname")
- public void changeNickname(
- @RequestHeader(name = "userId") String userId,
- @RequestBody ChangeNicknameRequestDto changeNicknameRequestDto
- ) {
- String nickname = changeNicknameRequestDto.getNickname();
- authUseCase.changeNickname(userId, nickname);
- }
-
- /**
- * ํํดํ๊ธฐ
- */
- @DeleteMapping(value = "/api/v1/auth/withdraw")
- public void withdraw(
- @RequestHeader(name = "userId") String userId
- ) {
- authUseCase.deleteUser(userId);
- }
-}
\ No newline at end of file
diff --git a/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangeNicknameRequestDto.java b/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangeNicknameRequestDto.java
deleted file mode 100644
index 1630088f..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangeNicknameRequestDto.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.sopt.app.v1.presentation.auth.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-public class ChangeNicknameRequestDto {
-
- private String nickname;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangePasswordRequestDto.java b/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangePasswordRequestDto.java
deleted file mode 100644
index ee796a70..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/auth/dto/ChangePasswordRequestDto.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.sopt.app.v1.presentation.auth.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-public class ChangePasswordRequestDto {
- String password;
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/firebase/FirebaseControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/firebase/FirebaseControllerV1.java
deleted file mode 100644
index 4c0027aa..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/firebase/FirebaseControllerV1.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.sopt.app.v1.presentation.firebase;
-
-
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.v1.presentation.firebase.dto.FirebaseResponseDto;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequiredArgsConstructor
-public class FirebaseControllerV1 {
-
-
- /**
- * firebase ์ฐ๋์ ์ํ ์ ๋ณด GET
- *
- * @return
- */
- @GetMapping(value = "/api/v1/firebase")
- public FirebaseResponseDto getfirebaseInfo() {
-
- return FirebaseResponseDto.builder()
- .iosForceUpdateVersion("1.0.0")
- .iosAppVersion("1.0.2")
- .androidForceUpdateVersion("1.0.0")
- .androidAppVersion("1.0.0")
- .notice("์๋
ํ์ธ์, makers์
๋๋ค. \n ํ์ฌ ๋ฏธ์
์์ /๋ฑ๋ก์ด ๋ถ๊ฐ๋ฅํ ์ด์๊ฐ ํ์ธ๋์ด ์์ธ ํ์
์ค์ ์์ต๋๋ค. \n ์ฑ ์ด์ฉ์ ๋ถํธ์ ๋๋ฆฐ ์ ์ฃ์กํฉ๋๋ค. \n ๋น ๋ฅธ ์์ผ ๋ด ๋ณต๊ตฌ ํ ์ฌ๊ณต์ง ๋๋ฆฌ๊ฒ ์ต๋๋ค.")
- .imgUrl(null)
- .build();
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/firebase/dto/FirebaseResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/firebase/dto/FirebaseResponseDto.java
deleted file mode 100644
index af7e00b1..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/firebase/dto/FirebaseResponseDto.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.sopt.app.v1.presentation.firebase.dto;
-
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-public class FirebaseResponseDto {
-
- @JsonProperty("iOS_force_update_version")
- private String iosForceUpdateVersion;
-
- @JsonProperty( "iOS_app_version")
- private String iosAppVersion;
-
- @JsonProperty("android_force_update_version")
- private String androidForceUpdateVersion;
-
- @JsonProperty( "android_app_version")
- private String androidAppVersion;
-
- private String notice;
-
- @JsonProperty("img_url")
- private String imgUrl;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/mission/MissionControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/mission/MissionControllerV1.java
deleted file mode 100644
index 2f920b57..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/mission/MissionControllerV1.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.sopt.app.v1.presentation.mission;
-
-
-import java.util.List;
-import lombok.AllArgsConstructor;
-import org.sopt.app.application.s3.S3Service;
-import org.sopt.app.domain.entity.Mission;
-import org.sopt.app.v1.application.mission.MissionServiceV1;
-import org.sopt.app.v1.presentation.BaseController;
-import org.sopt.app.v1.presentation.mission.dto.MissionRequestDto;
-import org.sopt.app.v1.presentation.mission.dto.MissionResponseDto;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("/api/v1/mission")
-public class MissionControllerV1 extends BaseController {
-
- private final MissionServiceV1 missionServiceV1;
- private final S3Service s3Service;
-
-
- /**
- * ์ ์ฒด mission ์กฐํํ๊ธฐ
- */
- @GetMapping(value = "/all")
- @ResponseBody
- public ResponseEntity> findAllMission(@RequestHeader("userId") String userId) {
- return new ResponseEntity<>(missionServiceV1.findAllMission(userId), getSuccessHeaders(),
- HttpStatus.OK);
- }
-
-
- /**
- * ๋ฏธ์
์
๋ก๋ ํ๊ธฐ
- */
- @PostMapping()
- public ResponseEntity> uploadMission(
- @RequestPart("missionContent") MissionRequestDto missionRequestDto,
- @RequestPart(name = "imgUrl", required = false) List multipartFiles) {
-
- //MultipartFile์ ๋ฆฌ์คํธ์ ๋ฃ์ด์คฌ๊ธฐ ๋๋ฌธ์ List ๋ด๋ถ์ ์ด๋ฏธ์งํ์ผ์ isEmpty()๋ฅผ ์ ์ฉํด์ผ ํ๋ค.
- int checkNum = 1;
- for (MultipartFile image : multipartFiles) {
- if (image.isEmpty()) {
- checkNum = 0;
- }
- }
-
- MissionResponseDto result = MissionResponseDto.builder().build();
- if (checkNum == 0) {
- Mission mission = missionServiceV1.uploadMission(missionRequestDto);
- result.setMissionId(mission.getId());
- } else {
- List imgPaths = s3Service.uploadDeprecated(multipartFiles);
- Mission uploadMissionWithImg = missionServiceV1.uploadMissionWithImg(missionRequestDto,
- imgPaths);
- result.setMissionId(uploadMissionWithImg.getId());
- }
-
- return new ResponseEntity<>(result, getSuccessHeaders(), HttpStatus.OK);
- }
-
-
- /**
- * ์๋ฃ ๋ฏธ์
๋ง ์กฐํํ๊ธฐ
- */
- @GetMapping("complete")
- public ResponseEntity> findCompleteMission(@RequestHeader("userId") String userId) {
-
- List resultMission = missionServiceV1.getCompleteMission(userId);
-
- return new ResponseEntity<>(resultMission, getSuccessHeaders(), HttpStatus.OK);
- }
-
- /**
- * ๋ฏธ์๋ฃ ๋ฏธ์
๋ง ์กฐํํ๊ธฐ
- */
- @GetMapping("incomplete")
- public ResponseEntity> findInCompleteMission(@RequestHeader("userId") String userId) {
- List resultMission = missionServiceV1.getIncompleteMission(userId);
-
- return new ResponseEntity<>(resultMission, getSuccessHeaders(), HttpStatus.OK);
- }
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/mission/dto/GetAllMissionResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/mission/dto/GetAllMissionResponseDto.java
deleted file mode 100644
index d0d46948..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/mission/dto/GetAllMissionResponseDto.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.sopt.app.v1.presentation.mission.dto;
-
-import java.util.List;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-@Getter
-@Setter
-@NoArgsConstructor
-public class GetAllMissionResponseDto {
-
- private Long id;
- private String title;
- private Integer level;
- private List profileImage;
- private Boolean isCompleted;
-
-
- @Builder
- public GetAllMissionResponseDto(
- Long id, String title, Integer level, List profileImage, Boolean isCompleted) {
- this.id = id;
- this.title = title;
- this.level = level;
- this.profileImage = profileImage;
- this.isCompleted = isCompleted;
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionRequestDto.java b/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionRequestDto.java
deleted file mode 100644
index 8952d5ff..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionRequestDto.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.sopt.app.v1.presentation.mission.dto;
-
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class MissionRequestDto {
-
- private String title; // ๋ฏธ์
์ ๋ชฉ
- private Integer level; // ๋ฏธ์
๋ ๋ฒจ
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionResponseDto.java
deleted file mode 100644
index 4e946c51..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/mission/dto/MissionResponseDto.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.sopt.app.v1.presentation.mission.dto;
-
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-@Getter
-@Setter
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class MissionResponseDto {
-
- private Long missionId;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/rank/RankControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/rank/RankControllerV1.java
deleted file mode 100644
index 38933171..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/rank/RankControllerV1.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.sopt.app.v1.presentation.rank;
-
-import java.util.List;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.rank.RankServiceV1;
-import org.sopt.app.v1.presentation.BaseController;
-import org.sopt.app.v1.presentation.rank.dto.FindAllRanksResponseDto;
-import org.sopt.app.v1.presentation.rank.dto.FindRankResponseDto;
-import org.sopt.app.v1.presentation.rank.dto.UserProfileRequestDto;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequiredArgsConstructor
-@RequestMapping("/api/v1/rank")
-public class RankControllerV1 extends BaseController {
-
- private final RankServiceV1 rankServiceV1;
-
- /**
- * ํ๋ง๋ ํธ์งํ๊ธฐ
- */
- @PostMapping("/profileMessage")
- public User updateUserProfileMessage(
- @RequestHeader Long userId,
- @RequestBody UserProfileRequestDto userProfileRequestDto
- ) {
-
- return rankServiceV1
- .updateProfileMessage(userId, userProfileRequestDto.getProfileMessage());
- }
-
- @GetMapping("")
- public List findRanks() {
- return rankServiceV1.findRanks();
- }
-
- @GetMapping("/detail")
- public FindRankResponseDto findRankById(
- @RequestHeader Long userId) {
- return rankServiceV1.findRankById(userId);
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindAllRanksResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindAllRanksResponseDto.java
deleted file mode 100644
index 4af1bbb1..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindAllRanksResponseDto.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.sopt.app.v1.presentation.rank.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@AllArgsConstructor
-@NoArgsConstructor
-@Builder
-public class FindAllRanksResponseDto {
- private Integer rank;
- private Long userId;
- private String nickname;
- private Long point;
-
- private String profileMessage;
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindRankResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindRankResponseDto.java
deleted file mode 100644
index c1df87c9..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/rank/dto/FindRankResponseDto.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.sopt.app.v1.presentation.rank.dto;
-
-import java.util.List;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import org.sopt.app.domain.entity.Mission;
-
-@Getter
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class FindRankResponseDto {
-
- private Long userId;
- private String nickname;
- private String profileMessage;
-
- private List userMissions;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/rank/dto/UserProfileRequestDto.java b/src/main/java/org/sopt/app/v1/presentation/rank/dto/UserProfileRequestDto.java
deleted file mode 100644
index 942d0fc7..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/rank/dto/UserProfileRequestDto.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.sopt.app.v1.presentation.rank.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@NoArgsConstructor
-@AllArgsConstructor
-public class UserProfileRequestDto {
-
- private String profileMessage;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/stamp/StampControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/stamp/StampControllerV1.java
deleted file mode 100644
index d7c17d19..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/stamp/StampControllerV1.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.sopt.app.v1.presentation.stamp;
-
-import java.util.List;
-import lombok.AllArgsConstructor;
-import org.sopt.app.application.s3.S3Service;
-import org.sopt.app.domain.entity.Stamp;
-import org.sopt.app.v1.application.stamp.StampServiceV1;
-import org.sopt.app.v1.presentation.BaseController;
-import org.sopt.app.v1.presentation.stamp.dto.StampRequestDto;
-import org.sopt.app.v1.presentation.stamp.dto.StampResponseDto;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestPart;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("/api/v1/stamp")
-public class StampControllerV1 extends BaseController {
-
- private final StampServiceV1 stampServiceV1;
-
- private final S3Service s3Service;
-
-
- /**
- * stamp ์กฐํ missionId, userId๋ก stamp ์กฐํํ๊ธฐ
- */
- @GetMapping("/{missionId}")
- public Stamp findStampByMissionAndUserId(
- @RequestHeader("userId") String userId,
- @PathVariable Long missionId) {
-
- return stampServiceV1.findStamp(userId, missionId);
- }
-
- /**
- * ๋ฏธ์
๋ฌ์ฑ์ ์ํด ๋ด์ฉ์ Stamp ๋ด์ฉ ๋ฑ๋ก
- */
- @PostMapping("/{missionId}")
- public ResponseEntity> uploadStamp(
- @RequestHeader("userId") String userId,
- @PathVariable Long missionId,
- @RequestPart("stampContent") StampRequestDto stampRequestDto,
- @RequestPart(name = "imgUrl", required = false) List multipartFiles
- ) {
-
- //์คํฌํ ์ค๋ณต ๊ฒ์ฌ์ฒดํฌ
- stampServiceV1.checkDuplicateStamp(userId, missionId);
-
- List imgPaths = s3Service.uploadDeprecated(multipartFiles);
- Stamp uploadStamp = stampServiceV1.uploadStamp(stampRequestDto,
- imgPaths, userId, missionId);
-
- return new ResponseEntity<>(uploadStamp, getSuccessHeaders(), HttpStatus.OK);
- }
-
-
- @PutMapping("/{missionId}")
- public ResponseEntity> editStamp(
- @RequestHeader("userId") String userId,
- @PathVariable Long missionId,
- @RequestPart(value = "stampContent", required = false) StampRequestDto stampRequestDto,
- @RequestPart(name = "imgUrl", required = false) List multipartFiles
-
- ) {
- //MultipartFile์ ๋ฆฌ์คํธ์ ๋ฃ์ด์คฌ๊ธฐ ๋๋ฌธ์ List ๋ด๋ถ์ ์ด๋ฏธ์งํ์ผ์ isEmpty()๋ฅผ ์ ์ฉํด์ผ ํ๋ค.
- int checkNum = 1;
- for (MultipartFile image : multipartFiles) {
- if (image.isEmpty()) {
- checkNum = 0;
- }
- }
-
- StampResponseDto result = StampResponseDto.builder().build();
- if (checkNum == 0) {
-
- Stamp stamp = stampServiceV1.editStampContents(stampRequestDto, userId, missionId);
- result.setStampId(stamp.getId());
-
- } else {
-
- List imgPaths = s3Service.uploadDeprecated(multipartFiles);
- Stamp uploadStamp = stampServiceV1.editStampWithImg(stampRequestDto,
- imgPaths, userId, missionId);
-
- result.setStampId(uploadStamp.getId());
- }
- return new ResponseEntity<>(result, getSuccessHeaders(), HttpStatus.OK);
- }
-
- /**
- * Stamp ๊ฐ๋ณ ์ญ์
- */
- @DeleteMapping("/{stampId}")
- public ResponseEntity> deleteStampById(@PathVariable Long stampId) {
- stampServiceV1.deleteByStampId(stampId);
- return new ResponseEntity<>("{}", getSuccessHeaders(), HttpStatus.OK);
- }
-
- /**
- * ์ ์ฒด Stamp์ญ์
- */
- @DeleteMapping("/all")
- public ResponseEntity> deleteStampByUserId(@RequestHeader Long userId) {
- stampServiceV1.deleteStampByUserId(userId);
- return new ResponseEntity<>("{}", getSuccessHeaders(), HttpStatus.OK);
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampRequestDto.java b/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampRequestDto.java
deleted file mode 100644
index 8ef7adef..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampRequestDto.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.sopt.app.v1.presentation.stamp.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-
-@Getter
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class StampRequestDto {
-
- private String contents; // ์คํฌํ ๋ด์ฉ
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampResponseDto.java b/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampResponseDto.java
deleted file mode 100644
index 57fae49b..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/stamp/dto/StampResponseDto.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.sopt.app.v1.presentation.stamp.dto;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-@Getter
-@Setter
-@Builder
-@AllArgsConstructor
-@NoArgsConstructor
-public class StampResponseDto {
-
- private Long stampId;
-
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/user/UserControllerV1.java b/src/main/java/org/sopt/app/v1/presentation/user/UserControllerV1.java
deleted file mode 100644
index f61f18c2..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/user/UserControllerV1.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.sopt.app.v1.presentation.user;
-
-import javax.validation.Valid;
-import lombok.RequiredArgsConstructor;
-import org.sopt.app.domain.entity.User;
-import org.sopt.app.v1.application.user.UserUseCase;
-import org.sopt.app.v1.application.user.dto.LogInUserDto;
-import org.sopt.app.v1.application.user.dto.SignUpUserDto;
-import org.sopt.app.v1.presentation.user.request.LogInUserRequest;
-import org.sopt.app.v1.presentation.user.response.LoginResponse;
-import org.sopt.app.v1.presentation.user.response.SignUpResponse;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequiredArgsConstructor
-public class UserControllerV1 {
-
- private final UserUseCase userUseCase;
-
- /**
- * ์ด๋ฉ์ผ ํ์๊ฐ์
- */
- @PostMapping(value = "/api/v1/user/signup")
- public SignUpResponse signUp2(@RequestBody SignUpUserDto request) {
- Long userId = userUseCase.signUp(SignUpUserDto.builder()
- .nickname(request.getNickname())
- .email(request.getEmail())
- .password(request.getPassword())
- .osType(request.getOsType())
- .clientToken(request.getClientToken())
- .build());
-
- return SignUpResponse.builder()
- .userId(userId)
- .build();
- }
-
-
- /**
- * ๋ก๊ทธ์ธ
- */
- @PostMapping(value = "/api/v1/user/login")
- public LoginResponse signIn2(@Valid @RequestBody LogInUserRequest request) {
-
- User user = userUseCase.logIn(LogInUserDto.builder()
- .email(request.getEmail())
- .password(request.getPassword())
- .build());
- return LoginResponse.builder()
- .userId(user.getId())
- .profileMessage(user.getProfileMessage())
- .build();
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/user/request/CreateUserRequest.java b/src/main/java/org/sopt/app/v1/presentation/user/request/CreateUserRequest.java
deleted file mode 100644
index 099ba336..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/user/request/CreateUserRequest.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.sopt.app.v1.presentation.user.request;
-
-import com.sun.istack.NotNull;
-import lombok.Getter;
-import org.sopt.app.domain.enums.OsType;
-
-@Getter
-public class CreateUserRequest {
-
- @NotNull
- private String nickname;
- @NotNull
- private String email;
- @NotNull
- private String password;
- private OsType osType;
- private String clientToken;
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/user/request/LogInUserRequest.java b/src/main/java/org/sopt/app/v1/presentation/user/request/LogInUserRequest.java
deleted file mode 100644
index fb6af1c7..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/user/request/LogInUserRequest.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.sopt.app.v1.presentation.user.request;
-
-import javax.validation.constraints.NotBlank;
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
-@Getter
-@Setter
-@NoArgsConstructor
-@AllArgsConstructor
-public class LogInUserRequest {
-
- @NotBlank(message = "์์ด๋๋ ๋น๋ฐ๋ฒํธ๋ ํ์ ์
๋ ฅ ๊ฐ์
๋๋ค.")
- private String email;
- @NotBlank(message = "์์ด๋๋ ๋น๋ฐ๋ฒํธ๋ ํ์ ์
๋ ฅ ๊ฐ์
๋๋ค.")
- private String password;
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/user/response/LoginResponse.java b/src/main/java/org/sopt/app/v1/presentation/user/response/LoginResponse.java
deleted file mode 100644
index 2ffb719d..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/user/response/LoginResponse.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.sopt.app.v1.presentation.user.response;
-
-import lombok.Builder;
-import lombok.Getter;
-
-@Getter
-public class LoginResponse {
- private Long userId;
- private String profileMessage;
-
- @Builder
- public LoginResponse(Long userId, String profileMessage) {
- this.userId = userId;
- this.profileMessage = profileMessage;
- }
-}
diff --git a/src/main/java/org/sopt/app/v1/presentation/user/response/SignUpResponse.java b/src/main/java/org/sopt/app/v1/presentation/user/response/SignUpResponse.java
deleted file mode 100644
index e4245b98..00000000
--- a/src/main/java/org/sopt/app/v1/presentation/user/response/SignUpResponse.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.sopt.app.v1.presentation.user.response;
-
-import lombok.Builder;
-import lombok.Getter;
-import lombok.Setter;
-
-@Getter
-@Builder
-@Setter
-public class SignUpResponse {
-
- private Long userId;
-
-
-}