x1ongzhu 6 lat temu
rodzic
commit
0d0a6bab3f

+ 14 - 0
src/main/java/com/izouma/walkchina/service/JourneyService.java

@@ -174,4 +174,18 @@ public class JourneyService {
         return Days.daysBetween(LocalDate.fromDateFields(start), LocalDate.fromDateFields(end)).getDays();
         return Days.daysBetween(LocalDate.fromDateFields(start), LocalDate.fromDateFields(end)).getDays();
     }
     }
 
 
+    // public FinishJourneyStage finishJourneyStage(Long userId) {
+    //     UserJourney userJourney = userJourneyRepository.findByUserId(userId);
+    //     if (userJourney == null) {
+    //         throw new ServiceException("无数据");
+    //     }
+    //     List<JourneyStage> stageList = journeyStageRepository.findAllByJourneyIdOrderById(userJourney.getId());
+    //     if (stageList.size() == 0) {
+    //         throw new ServiceException("无数据");
+    //     }
+    //     JourneyStage latestStage = stageList.get(stageList.size() - 1);
+    //     if (latestStage.getProgress() < 1) {
+    //         throw new ServiceException("");
+    //     }
+    // }
 }
 }

+ 2 - 2
src/test/java/com/izouma/walkchina/service/TeamServiceTest.java

@@ -39,9 +39,9 @@ public class TeamServiceTest {
     @Test
     @Test
     public void createShareImg() {
     public void createShareImg() {
         try {
         try {
-            teamService.recruitImg(890L);
+            teamService.recruitImg(1842L);
         } catch (IOException | FontFormatException | WxErrorException e) {
         } catch (IOException | FontFormatException | WxErrorException e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
     }
     }
-}
+}