From 1d37b8d2ea9fbbe3e93a3a0cdbdc2b652d03fd90 Mon Sep 17 00:00:00 2001 From: johngreen Date: Thu, 30 Apr 2026 06:53:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(ai-agent):=20list=20=EC=BF=BC=EB=A6=AC?= =?UTF-8?q?=EA=B0=80=20archived(soft-delete)=20=ED=96=89=EC=9D=84=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EC=A0=9C=EC=99=B8=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 증상: 에이전트 삭제 후에도 목록에 그대로 표시. 원인: softDelete 가 status='archived' 로만 변경하는데 list 쿼리가 status 필터 미지정 시 archived 도 모두 반환. 수정: status 명시 X 시 status != 'archived' 기본 적용. status 명시 시 그 값으로 정확 매칭. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../src/main/resources/mapper/ai/AiAgentMapper.xml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/backend-spring/src/main/resources/mapper/ai/AiAgentMapper.xml b/backend-spring/src/main/resources/mapper/ai/AiAgentMapper.xml index 1a3f55fb..083a62d8 100644 --- a/backend-spring/src/main/resources/mapper/ai/AiAgentMapper.xml +++ b/backend-spring/src/main/resources/mapper/ai/AiAgentMapper.xml @@ -24,9 +24,14 @@ tools::text AS tools, config::text AS config, status, company_code, created_by, created_at, updated_at FROM ai_agents WHERE 1=1 - - AND status = #{status} - + + + AND status = #{status} + + + AND status != 'archived' + + AND (company_code = #{company_code} OR company_code IS NULL OR company_code = '*')