diff --git a/.gradle/8.4/executionHistory/executionHistory.bin b/.gradle/8.4/executionHistory/executionHistory.bin
index 8bc5503..1f3072f 100644
Binary files a/.gradle/8.4/executionHistory/executionHistory.bin and b/.gradle/8.4/executionHistory/executionHistory.bin differ
diff --git a/.gradle/8.4/executionHistory/executionHistory.lock b/.gradle/8.4/executionHistory/executionHistory.lock
index c555c2b..5cd8349 100644
Binary files a/.gradle/8.4/executionHistory/executionHistory.lock and b/.gradle/8.4/executionHistory/executionHistory.lock differ
diff --git a/.gradle/8.4/fileHashes/fileHashes.bin b/.gradle/8.4/fileHashes/fileHashes.bin
index 3170206..800fbad 100644
Binary files a/.gradle/8.4/fileHashes/fileHashes.bin and b/.gradle/8.4/fileHashes/fileHashes.bin differ
diff --git a/.gradle/8.4/fileHashes/fileHashes.lock b/.gradle/8.4/fileHashes/fileHashes.lock
index 2556483..71c4141 100644
Binary files a/.gradle/8.4/fileHashes/fileHashes.lock and b/.gradle/8.4/fileHashes/fileHashes.lock differ
diff --git a/.gradle/8.4/fileHashes/resourceHashesCache.bin b/.gradle/8.4/fileHashes/resourceHashesCache.bin
index b7b94e9..1479817 100644
Binary files a/.gradle/8.4/fileHashes/resourceHashesCache.bin and b/.gradle/8.4/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
index 8b8189f..e50c5bf 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe
index 440e2ef..f44c424 100644
Binary files a/.gradle/file-system.probe and b/.gradle/file-system.probe differ
diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml
index e6e0867..18b00ba 100644
--- a/.idea/dataSources.local.xml
+++ b/.idea/dataSources.local.xml
@@ -5,6 +5,7 @@
#@
`
+ true
master_key
@@ -23,7 +24,6 @@
#@
`
- true
master_key
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 12a6ebd..ea7c72b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,20 +5,10 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -113,38 +103,38 @@
- {
+ "keyToString": {
+ "Gradle.Build PodMate.executor": "Run",
+ "Gradle.C:/Users/pwyic/desktop/PodMate/be [clean].executor": "Run",
+ "Gradle.PodMate:be [build].executor": "Run",
+ "RequestMappingsPanelOrder0": "0",
+ "RequestMappingsPanelOrder1": "1",
+ "RequestMappingsPanelWidth0": "75",
+ "RequestMappingsPanelWidth1": "75",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "Spring Boot.PodMateApplication.executor": "Run",
+ "git-widget-placeholder": "feat/#122-cancel-jjim",
+ "kotlin-language-version-configured": "true",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.0",
+ "settings.editor.selected.configurable": "reference.settingsdialog.project.gradle",
+ "vue.rearranger.settings.migration": "true"
},
- "keyToStringList": {
- "DatabaseDriversLRU": [
- "mysql_aurora",
- "mysql"
+ "keyToStringList": {
+ "DatabaseDriversLRU": [
+ "mysql_aurora",
+ "mysql"
]
}
-}]]>
+}
@@ -261,7 +251,9 @@
-
+
+
+
diff --git a/be/src/main/java/com/podmate/domain/pod/application/PodService.java b/be/src/main/java/com/podmate/domain/pod/application/PodService.java
index db737e4..d8c11a5 100644
--- a/be/src/main/java/com/podmate/domain/pod/application/PodService.java
+++ b/be/src/main/java/com/podmate/domain/pod/application/PodService.java
@@ -297,35 +297,21 @@ public void updatePodStatus(Long podId, PodRequestDto.ChangingInprogressStatus r
throw new PodUserMappingNotFoundException();
}
- InprogressStatus currentStatus = pod.getInprogressStatus();
String nextStatus = request.getStatus();
- // 상태 전이 조건 검사
- if ("ORDER_COMPLETED".equals(nextStatus)) {
- if (currentStatus != InprogressStatus.PENDING_ORDER) {
- throw new PendingOrderMismatchException();
- }
- pod.updateInprogressStatus(InprogressStatus.ORDER_COMPLETED);
-
- notificationService.notifyAddTrackingNum(user.getId(), pod);
- //팟원에게 주문 완료 알림 전송
- List receivers = podUserMappingRepository.findMembersByPodId(pod.getId());
- for (User receiver : receivers) {
- notificationService.notifyOrderPlaced(receiver.getId(), pod);
- }
- }
- else if("DELIVERED".equals(nextStatus)) {
+ // 상태 업데이트는 항상 허용
+ if (!nextStatus.equals("DELIVERED") && !nextStatus.equals("SHIPPING")) {
+ InprogressStatus next = InprogressStatus.valueOf(nextStatus);
+ pod.updateInprogressStatus(next);
+ }else{
Delivery delivery = deliveryRepository.findByPod_Id(pod.getId())
- .orElseThrow(() -> new DeliveryNotFoundException());
+ .orElseThrow(() -> new DeliveryNotFoundException());
+ DeliveryStatus deliveryStatus = DeliveryStatus.valueOf(nextStatus);
+ delivery.updateDeliveryStatus(deliveryStatus);
- if (delivery.getDeliveryStatus() != DeliveryStatus.SHIPPING){
- throw new ShippingMismatchException();
+ if (deliveryStatus == DeliveryStatus.DELIVERED) {
+ notificationService.notifyDeliveryArrived(user.getId(), pod);
}
- delivery.updateDeliveryStatus(DeliveryStatus.DELIVERED);
- notificationService.notifyDeliveryArrived(user.getId(), pod);
- }
- else{
- throw new InvalidStatusException();
}
}