From f6f950fc73dcda307347d6b916857d858ef2887b Mon Sep 17 00:00:00 2001 From: eunjungL Date: Sat, 24 Aug 2024 15:21:34 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=8C=EB=9E=AB=ED=8F=BC=20=EB=AF=B8?= =?UTF-8?q?=EC=85=98=20=EC=83=81=ED=83=9C=20=EC=A1=B0=ED=9A=8C=EC=97=90=20?= =?UTF-8?q?synchronized=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mashong/MashongMissionFacadeService.java | 14 +++++++------- .../ui/mashong/MashongMissionController.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mashup-member/src/main/java/kr/mashup/branding/facade/mashong/MashongMissionFacadeService.java b/mashup-member/src/main/java/kr/mashup/branding/facade/mashong/MashongMissionFacadeService.java index 55b0cc6e..7f076e0a 100644 --- a/mashup-member/src/main/java/kr/mashup/branding/facade/mashong/MashongMissionFacadeService.java +++ b/mashup-member/src/main/java/kr/mashup/branding/facade/mashong/MashongMissionFacadeService.java @@ -65,21 +65,21 @@ public void setToValue(MissionStrategyType missionStrategyType, MemberGeneration } @Transactional - public MissionStatus missionStatus(Long memberGenerationId, MashongMission mashongMission) { + public MissionStatus getMissionStatus(Long memberGenerationId, MashongMission mashongMission) { MemberGeneration memberGeneration = memberService.findByMemberGenerationId(memberGenerationId); if (mashongMission.getMissionType() == MissionType.TEAM) { - return missionStatus(memberGeneration.getPlatform(), memberGeneration.getGeneration().getId(), mashongMission); + return getMissionStatus(memberGeneration.getPlatform(), memberGeneration.getGeneration().getId(), mashongMission); } else { - return missionStatus(memberGeneration, mashongMission); + return getMissionStatus(memberGeneration, mashongMission); } } @Transactional - public List missionStatusList(Long memberGenerationId) { + public List getMissionStatusList(Long memberGenerationId) { List mashongMissionList = mashongMissionService.findAll(); return mashongMissionList.stream() - .map(mission -> missionStatus(memberGenerationId, mission)) + .map(mission -> getMissionStatus(memberGenerationId, mission)) .collect(Collectors.toList()); } @@ -107,13 +107,13 @@ private MashongMissionLevel getLatestMissionLevel(Platform platform, Long genera } } - private MissionStatus missionStatus(MemberGeneration memberGeneration, MashongMission mashongMission) { + private MissionStatus getMissionStatus(MemberGeneration memberGeneration, MashongMission mashongMission) { MashongMissionLevel latestMissionLevel = getLatestMissionLevel(memberGeneration, mashongMission); MashongMissionLog mashongMissionLog = mashongMissionLogService.getMissionLog(latestMissionLevel, memberGeneration.getId()); return MissionStatus.of(mashongMission, latestMissionLevel, mashongMissionLog); } - private MissionStatus missionStatus(Platform platform, Long generationId, MashongMission mashongMission) { + synchronized private MissionStatus getMissionStatus(Platform platform, Long generationId, MashongMission mashongMission) { MashongMissionLevel latestMissionLevel = getLatestMissionLevel(platform, generationId, mashongMission); MashongMissionTeamLog mashongMissionLog = mashongMissionTeamLogService.getMissionLog(latestMissionLevel, platform, generationId); return MissionStatus.of(mashongMission, latestMissionLevel, mashongMissionLog); diff --git a/mashup-member/src/main/java/kr/mashup/branding/ui/mashong/MashongMissionController.java b/mashup-member/src/main/java/kr/mashup/branding/ui/mashong/MashongMissionController.java index b5edae94..fa829b25 100644 --- a/mashup-member/src/main/java/kr/mashup/branding/ui/mashong/MashongMissionController.java +++ b/mashup-member/src/main/java/kr/mashup/branding/ui/mashong/MashongMissionController.java @@ -37,7 +37,7 @@ public class MashongMissionController { public ApiResponse> missionStatusList( @ApiIgnore MemberAuth memberAuth ) { - return ApiResponse.success(mashongMissionFacadeService.missionStatusList(memberAuth.getMemberGenerationId())); + return ApiResponse.success(mashongMissionFacadeService.getMissionStatusList(memberAuth.getMemberGenerationId())); } @ApiOperation(value = "매숑이 출석 현황")