From a6e68dcf55edaa0aed910c66c4ef1dae56f0496a Mon Sep 17 00:00:00 2001 From: Jeongmo Seo Date: Sun, 3 Aug 2025 13:26:51 +0900 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=20fix:=20=EA=B0=81=20Type=EC=9D=98=20?= =?UTF-8?q?Percentage=EA=B0=80=20S,=20A,=20M,=20E=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4=2050=20=EB=AF=B8=EB=A7=8C=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=82=98=EC=98=A4=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/WeightBaseTestScoreCalculator.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/withtime/be/withtimebe/domain/date/preference/util/WeightBaseTestScoreCalculator.java b/src/main/java/org/withtime/be/withtimebe/domain/date/preference/util/WeightBaseTestScoreCalculator.java index 2e6b496..9719364 100644 --- a/src/main/java/org/withtime/be/withtimebe/domain/date/preference/util/WeightBaseTestScoreCalculator.java +++ b/src/main/java/org/withtime/be/withtimebe/domain/date/preference/util/WeightBaseTestScoreCalculator.java @@ -49,10 +49,16 @@ public DatePreferenceTestResult calculateTestScore(DatePreferenceRequestDTO.Test } private String calculatePartType(List list, Double[] percentages, int start, int size) { - double score = calculateScore(list, start, size); + double score = Math.floor((calculateScore(list, start, size) - 1) * 1000) / 10; int index = start / size; - percentages[index] = Math.floor((score - 1) * 1000) / 10; - return score < 1.5 ? types[index][0].name() : types[index][1].name(); + if (score < 50.0) { + percentages[index] = 100.0 - score; + return types[index][0].name(); + } + else { + percentages[index] = score; + return types[index][1].name(); + } } // return value between 1, 2 From 56251c05c989ee027d11ca53157acf212919addd Mon Sep 17 00:00:00 2001 From: Jeongmo Seo Date: Sun, 3 Aug 2025 13:37:31 +0900 Subject: [PATCH 2/2] =?UTF-8?q?:memo:=20docs:=20Controller=20=EC=8A=A4?= =?UTF-8?q?=EC=9B=A8=EA=B1=B0=20=EC=84=A4=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../preference/controller/DatePreferenceController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/withtime/be/withtimebe/domain/date/preference/controller/DatePreferenceController.java b/src/main/java/org/withtime/be/withtimebe/domain/date/preference/controller/DatePreferenceController.java index 69f0cdf..95e3bc8 100644 --- a/src/main/java/org/withtime/be/withtimebe/domain/date/preference/controller/DatePreferenceController.java +++ b/src/main/java/org/withtime/be/withtimebe/domain/date/preference/controller/DatePreferenceController.java @@ -26,21 +26,21 @@ public class DatePreferenceController { private final DatePreferenceDescriptionQueryService datePreferenceDescriptionQueryService; private final DatePreferenceQuestionQueryService datePreferenceQuestionQueryService; - @Operation(summary = "데이트 취향 조회 API", description = "데이트 취향 종류 조회") + @Operation(summary = "데이트 취향 조회 API by 요시", description = "데이트 취향 종류 조회") @ApiResponse(responseCode = "COMMON200", description = "성공적으로 정보를 가져왔습니다.") @GetMapping public DefaultResponse findTypes() { return DefaultResponse.ok(DatePreferenceConverter.toFindTypes(datePreferenceDescriptionQueryService.findTypes())); } - @Operation(summary = "데이트 취향 테스트 질문 조회 API", description = "데이트 취향 테스트에 사용되는 질문 조회하는 API") + @Operation(summary = "데이트 취향 테스트 질문 조회 API by 요시", description = "데이트 취향 테스트에 사용되는 질문 조회하는 API") @ApiResponse(responseCode = "COMMON200", description = "성공적으로 정보를 가져왔습니다.") @GetMapping("/questions") public DefaultResponse findQuestions() { return DefaultResponse.ok(DatePreferenceConverter.toFindQuestions(datePreferenceQuestionQueryService.findQuestions())); } - @Operation(summary = "데이트 취향 테스트 API", description = "질문에 대한 답변으로 결과 생성하는 API 1, 2 둘 중 하나로 40개로 채워 배열 형태로 전송") + @Operation(summary = "데이트 취향 테스트 API by 요시", description = "질문에 대한 답변으로 결과 생성하는 API 1, 2 둘 중 하나로 40개로 채워 배열 형태로 전송") @ApiResponses({ @ApiResponse(responseCode = "COMMON200", description = "테스트에 성공했습니다."), @ApiResponse(