From a5653eee3e848860934e70873df63e93a3f97abb Mon Sep 17 00:00:00 2001 From: kjs Date: Wed, 1 Oct 2025 10:51:09 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20Phase=203.3=20ComponentStandardService?= =?UTF-8?q?=20=EC=99=84=EB=A3=8C=20=EB=AC=B8=EC=84=9C=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=B0=8F=20=EC=BD=94=EB=93=9C=20=ED=8F=AC?= =?UTF-8?q?=EB=A7=B7=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md 업데이트 - ComponentStandardService (15개) 완료 표시 - Phase 3 진행률 반영 - componentStandardService.ts 코드 포맷 정리 Phase 3 진행률: 54/162 (33.3%) 전체 진행률: 305/444 (68.7%) --- PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md | 16 +++++++++++++--- .../src/services/componentStandardService.ts | 7 +++---- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md b/PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md index 67dacab9..3994cd4e 100644 --- a/PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md +++ b/PRISMA_TO_RAW_QUERY_MIGRATION_PLAN.md @@ -124,7 +124,7 @@ backend-node/ (루트) - `multilangService.ts` (0개) - ✅ **전환 완료** (Phase 3.1) - `batchService.ts` (0개) - ✅ **전환 완료** (Phase 3.2) -- `componentStandardService.ts` (16개) - 컴포넌트 표준 관리 +- `componentStandardService.ts` (0개) - ✅ **전환 완료** (Phase 3.3) - `commonCodeService.ts` (15개) - 코드 관리, 계층 구조 - `dataflowDiagramService.ts` (12개) - 다이어그램 관리 ⭐ 신규 발견 - `collectionService.ts` (11개) - 컬렉션 관리 @@ -1146,12 +1146,22 @@ describe("Performance Benchmarks", () => { - [x] transaction 함수 활용 (client.query().rows 처리) - [x] TypeScript 컴파일 성공 - [x] Prisma import 완전 제거 +- [x] **ComponentStandardService 전환 (15개)** ✅ **완료** (Phase 3.3) + - [x] 15개 Prisma 호출 전환 완료 (컴포넌트 표준 CRUD) + - [x] 동적 WHERE 조건 생성 (ILIKE 검색, OR 조건) + - [x] 동적 UPDATE 쿼리 (fieldMapping 사용) + - [x] GROUP BY 집계 쿼리 (카테고리별, 상태별) + - [x] DISTINCT 쿼리 (카테고리 목록) + - [x] 트랜잭션 처리 (정렬 순서 업데이트) + - [x] SQL 인젝션 방지 (정렬 컬럼 검증) + - [x] TypeScript 컴파일 성공 + - [x] Prisma import 완전 제거 - [ ] 배치 관련 서비스 전환 (26개) ⭐ 대규모 신규 발견 - [ ] BatchExternalDbService (8개) - [ ] BatchExecutionLogService (7개), BatchManagementService (5개) - [ ] BatchSchedulerService (4개) -- [ ] 표준 관리 서비스 전환 (41개) - - [ ] ComponentStandardService (16개), CommonCodeService (15개) +- [ ] 표준 관리 서비스 전환 (25개) + - [ ] CommonCodeService (15개) - [ ] LayoutService (10개) - [ ] 데이터플로우 관련 서비스 (18개) ⭐ 신규 발견 - [ ] DataflowDiagramService (12개), DataflowControlService (6개) diff --git a/backend-node/src/services/componentStandardService.ts b/backend-node/src/services/componentStandardService.ts index 496a4ae7..f36a3d19 100644 --- a/backend-node/src/services/componentStandardService.ts +++ b/backend-node/src/services/componentStandardService.ts @@ -257,10 +257,9 @@ class ComponentStandardService { async deleteComponent(component_code: string) { const existing = await this.getComponent(component_code); - await query( - `DELETE FROM component_standards WHERE component_code = $1`, - [component_code] - ); + await query(`DELETE FROM component_standards WHERE component_code = $1`, [ + component_code, + ]); return { message: `컴포넌트가 삭제되었습니다: ${component_code}` }; }