-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from Team-Sopetit/fix/#530/sohyeon
[FIX] 루틴/미션 달성 로직 수정
- Loading branch information
Showing
30 changed files
with
174 additions
and
50 deletions.
There are no files selected for viewing
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
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
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
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
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
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
6 changes: 3 additions & 3 deletions
6
...persistence/adapter/ChallengeAdapter.java → ...nce/adapter/mission/ChallengeAdapter.java
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
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
6 changes: 3 additions & 3 deletions
6
...r/persistence/adapter/MissionAdapter.java → ...tence/adapter/mission/MissionAdapter.java
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
18 changes: 18 additions & 0 deletions
18
src/main/java/com/soptie/server/persistence/adapter/mission/MissionHistoryAdapter.java
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,18 @@ | ||
package com.soptie.server.persistence.adapter.mission; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import com.soptie.server.persistence.entity.mission.MissionHistoryEntity; | ||
import com.soptie.server.persistence.repository.mission.MissionHistoryRepository; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class MissionHistoryAdapter { | ||
private final MissionHistoryRepository historyRepository; | ||
|
||
public void save(long memberMissionId) { | ||
historyRepository.save(new MissionHistoryEntity(memberMissionId)); | ||
} | ||
} |
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
4 changes: 2 additions & 2 deletions
4
...r/persistence/adapter/RoutineAdapter.java → ...tence/adapter/routine/RoutineAdapter.java
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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/soptie/server/persistence/adapter/routine/RoutineHistoryAdapter.java
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,24 @@ | ||
package com.soptie.server.persistence.adapter.routine; | ||
|
||
import java.time.LocalDate; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import com.soptie.server.persistence.entity.routine.RoutineHistoryEntity; | ||
import com.soptie.server.persistence.repository.routine.RoutineHistoryRepository; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class RoutineHistoryAdapter { | ||
private final RoutineHistoryRepository historyRepository; | ||
|
||
public void save(long memberRoutineId) { | ||
historyRepository.save(new RoutineHistoryEntity(memberRoutineId)); | ||
} | ||
|
||
public void deleteByRoutineIdAndCreatedAt(long memberRoutineId, LocalDate date) { | ||
historyRepository.deleteByMemberRoutineIdAndCreatedAt(memberRoutineId, date); | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...r/persistence/entity/ChallengeEntity.java → ...tence/entity/mission/ChallengeEntity.java
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
3 changes: 2 additions & 1 deletion
3
...rsistence/entity/MemberMissionEntity.java → ...e/entity/mission/MemberMissionEntity.java
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
3 changes: 2 additions & 1 deletion
3
...ver/persistence/entity/MissionEntity.java → ...istence/entity/mission/MissionEntity.java
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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/soptie/server/persistence/entity/mission/MissionHistoryEntity.java
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,19 @@ | ||
package com.soptie.server.persistence.entity.mission; | ||
|
||
import com.soptie.server.persistence.entity.BaseEntity; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "mission_history", schema = "softie") | ||
public class MissionHistoryEntity extends BaseEntity { | ||
private long memberMissionId; | ||
|
||
public MissionHistoryEntity(long memberMissionId) { | ||
this.memberMissionId = memberMissionId; | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...rsistence/entity/MemberRoutineEntity.java → ...e/entity/routine/MemberRoutineEntity.java
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
3 changes: 2 additions & 1 deletion
3
...ver/persistence/entity/RoutineEntity.java → ...istence/entity/routine/RoutineEntity.java
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
19 changes: 19 additions & 0 deletions
19
src/main/java/com/soptie/server/persistence/entity/routine/RoutineHistoryEntity.java
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,19 @@ | ||
package com.soptie.server.persistence.entity.routine; | ||
|
||
import com.soptie.server.persistence.entity.BaseEntity; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Table(name = "routine_history", schema = "softie") | ||
public class RoutineHistoryEntity extends BaseEntity { | ||
private long memberRoutineId; | ||
|
||
public RoutineHistoryEntity(long memberRoutineId) { | ||
this.memberRoutineId = memberRoutineId; | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
...tence/repository/ChallengeRepository.java → ...pository/mission/ChallengeRepository.java
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
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
8 changes: 8 additions & 0 deletions
8
src/main/java/com/soptie/server/persistence/repository/mission/MissionHistoryRepository.java
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,8 @@ | ||
package com.soptie.server.persistence.repository.mission; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import com.soptie.server.persistence.entity.mission.MissionHistoryEntity; | ||
|
||
public interface MissionHistoryRepository extends JpaRepository<MissionHistoryEntity, Long> { | ||
} |
4 changes: 2 additions & 2 deletions
4
...istence/repository/MissionRepository.java → ...repository/mission/MissionRepository.java
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
Oops, something went wrong.