From 4080acc612998dab8e7f4c54b4c764615142c725 Mon Sep 17 00:00:00 2001 From: sgo722 Date: Sun, 1 Feb 2026 20:23:27 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[fix]=20AdminController=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=20=EC=83=81=ED=83=9C=20=EC=B9=B4=EC=9A=B4=ED=8A=B8=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A7=88=EB=AC=B8=20=EA=B7=B8=EB=A3=B9=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - statusCounts에 PERSONALITY_COMPLETED, WITHDRAWN 상태 추가 - 회원 관리 페이지 SpelEvaluationException 오류 해결 - questionGroup 파라미터를 optional로 변경 - 회원가입 전용 카테고리는 자동으로 RANDOM 그룹 지정 Closes #393 Co-Authored-By: Claude Opus 4.5 --- .../admin/presentation/AdminController.kt | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/codel/admin/presentation/AdminController.kt b/src/main/kotlin/codel/admin/presentation/AdminController.kt index b37298f..4e4a0eb 100644 --- a/src/main/kotlin/codel/admin/presentation/AdminController.kt +++ b/src/main/kotlin/codel/admin/presentation/AdminController.kt @@ -321,7 +321,9 @@ class AdminController( "PENDING" to adminService.countMembersByStatus("PENDING"), "DONE" to adminService.countMembersByStatus("DONE"), "REJECT" to adminService.countMembersByStatus("REJECT"), - "PHONE_VERIFIED" to adminService.countMembersByStatus("PHONE_VERIFIED") + "PHONE_VERIFIED" to adminService.countMembersByStatus("PHONE_VERIFIED"), + "PERSONALITY_COMPLETED" to adminService.countMembersByStatus("PERSONALITY_COMPLETED"), + "WITHDRAWN" to adminService.countMembersByStatus("WITHDRAWN") ) model.addAttribute("members", members) @@ -390,14 +392,19 @@ class AdminController( fun createQuestion( @RequestParam content: String, @RequestParam category: String, - @RequestParam questionGroup: String, + @RequestParam(required = false) questionGroup: String?, @RequestParam(required = false) description: String?, @RequestParam(defaultValue = "true") isActive: Boolean, redirectAttributes: RedirectAttributes ): String { try { val questionCategory = QuestionCategory.valueOf(category) - val group = QuestionGroup.valueOf(questionGroup) + // 회원가입 전용 카테고리(채팅 미사용)는 자동으로 RANDOM 그룹 지정 + val group = if (questionCategory.usedInSignup && !questionCategory.usedInChat) { + QuestionGroup.RANDOM + } else { + QuestionGroup.valueOf(questionGroup ?: "RANDOM") + } adminService.createQuestionV2(content, questionCategory, group, description, isActive) redirectAttributes.addFlashAttribute("success", "질문이 성공적으로 등록되었습니다.") } catch (e: Exception) { @@ -423,14 +430,19 @@ class AdminController( @PathVariable questionId: Long, @RequestParam content: String, @RequestParam category: String, - @RequestParam questionGroup: String, + @RequestParam(required = false) questionGroup: String?, @RequestParam(required = false) description: String?, @RequestParam(defaultValue = "false") isActive: Boolean, redirectAttributes: RedirectAttributes ): String { try { val questionCategory = QuestionCategory.valueOf(category) - val group = QuestionGroup.valueOf(questionGroup) + // 회원가입 전용 카테고리(채팅 미사용)는 자동으로 RANDOM 그룹 지정 + val group = if (questionCategory.usedInSignup && !questionCategory.usedInChat) { + QuestionGroup.RANDOM + } else { + QuestionGroup.valueOf(questionGroup ?: "RANDOM") + } adminService.updateQuestionV2(questionId, content, questionCategory, group, description, isActive) redirectAttributes.addFlashAttribute("success", "질문이 성공적으로 수정되었습니다.") } catch (e: Exception) { From 94866a272cf1c775ef84773ea81f14e883f0cd42 Mon Sep 17 00:00:00 2001 From: sgo722 Date: Sun, 1 Feb 2026 20:23:33 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[feat]=20=EC=A7=88=EB=AC=B8=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20UI=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 용도 선택 필드 추가 (채팅방/회원가입) - 용도에 따른 카테고리 옵션 동적 변경 - 회원가입 용도 선택 시 그룹 자동 RANDOM 설정 - 그룹 설정 가이드 info-box 추가 - 카테고리 표시를 displayName만 표시하도록 변경 Co-Authored-By: Claude Opus 4.5 --- .../resources/templates/questionForm.html | 136 ++++++++++++++++-- 1 file changed, 128 insertions(+), 8 deletions(-) diff --git a/src/main/resources/templates/questionForm.html b/src/main/resources/templates/questionForm.html index 43ef946..6eed7c3 100644 --- a/src/main/resources/templates/questionForm.html +++ b/src/main/resources/templates/questionForm.html @@ -29,6 +29,28 @@ border-radius: 1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); } + + .info-box { + background: #E3F2FD; + border-left: 3px solid #4A90E2; + padding: 1rem; + border-radius: 4px; + margin-bottom: 1.5rem; + } + + .info-box-title { + font-size: 0.9rem; + font-weight: 600; + margin-bottom: 0.5rem; + color: #4A90E2; + } + + .info-box ul { + margin-left: 1.5rem; + font-size: 0.85rem; + color: #7F8C8D; + margin-bottom: 0; + } @@ -48,25 +70,40 @@

새 질문 등록

+
+
📌 그룹 설정 가이드
+
    +
  • A그룹: 가벼운/진입용 질문 (먼저 노출, 대화 시작에 적합)
  • +
  • B그룹: 깊이있는/무게감 질문 (A그룹 소진 후 노출)
  • +
  • 랜덤: 텐션업 코드 등 그룹 구분 없는 질문
  • +
+
+
-
최대 500자까지 입력 가능합니다.
+
+ + +
+
-
+
최대 1000자까지 입력 가능합니다.
@@ -110,5 +147,88 @@

새 질문 등록

+ - \ No newline at end of file + From 7eb24034e63ef5eeb0db573842fbb8eef7e9ca81 Mon Sep 17 00:00:00 2001 From: sgo722 Date: Sun, 1 Feb 2026 20:23:38 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[feat]=20=EC=A7=88=EB=AC=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20UI=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 용도 선택 필드 추가 및 기존 값 자동 선택 - 기존 카테고리/그룹 값을 hidden 필드로 보존 - 용도에 따른 카테고리 옵션 동적 변경 - 회원가입 용도 선택 시 그룹 자동 RANDOM 설정 - 그룹 설정 가이드 info-box 추가 Co-Authored-By: Claude Opus 4.5 --- .../resources/templates/questionEditForm.html | 183 +++++++++++++++++- 1 file changed, 173 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/questionEditForm.html b/src/main/resources/templates/questionEditForm.html index ebbd1cf..5165a18 100644 --- a/src/main/resources/templates/questionEditForm.html +++ b/src/main/resources/templates/questionEditForm.html @@ -29,6 +29,28 @@ border-radius: 1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); } + + .info-box { + background: #E3F2FD; + border-left: 3px solid #4A90E2; + padding: 1rem; + border-radius: 4px; + margin-bottom: 1.5rem; + } + + .info-box-title { + font-size: 0.9rem; + font-weight: 600; + margin-bottom: 0.5rem; + color: #4A90E2; + } + + .info-box ul { + margin-left: 1.5rem; + font-size: 0.85rem; + color: #7F8C8D; + margin-bottom: 0; + } @@ -49,6 +71,15 @@

질문 수정

+
+
📌 그룹 설정 가이드
+
    +
  • A그룹: 가벼운/진입용 질문 (먼저 노출, 대화 시작에 적합)
  • +
  • B그룹: 깊이있는/무게감 질문 (A그룹 소진 후 노출)
  • +
  • 랜덤: 텐션업 코드 등 그룹 구분 없는 질문
  • +
+
+ @@ -57,6 +88,10 @@

질문 수정

+ + + +
최대 1000자까지 입력 가능합니다.
@@ -124,5 +163,129 @@

질문 수정

+ - \ No newline at end of file + From fe6706517e60b554f5985e85661f935fc2cd1d9c Mon Sep 17 00:00:00 2001 From: sgo722 Date: Sun, 1 Feb 2026 20:23:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[feat]=20=EC=A7=88=EB=AC=B8=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=95=84=ED=84=B0=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - optgroup display:none 방식에서 JavaScript 동적 생성으로 변경 - 브라우저 호환성 문제 해결 - 필터 값 보존을 위한 hidden 필드 추가 - 페이지 로드 시 기존 필터 값 복원 Co-Authored-By: Claude Opus 4.5 --- .../resources/templates/questionList.html | 92 +++++++++++-------- 1 file changed, 52 insertions(+), 40 deletions(-) diff --git a/src/main/resources/templates/questionList.html b/src/main/resources/templates/questionList.html index 300896f..d3abb51 100644 --- a/src/main/resources/templates/questionList.html +++ b/src/main/resources/templates/questionList.html @@ -54,7 +54,7 @@

질문 관리

- @@ -64,20 +64,9 @@

질문 관리

+ +
@@ -202,43 +191,66 @@

질문 관리