From ca44e8a96791ff3ed3378ceb4da7d0962c55a3b4 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Fri, 3 Jul 2026 16:55:05 +0900 Subject: [PATCH] =?UTF-8?q?-=20PortalProperty=20=EC=84=A4=EB=AA=85=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=B1=84=EC=9A=B0=EA=B8=B0=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80:=20=EB=B9=84=EC=96=B4=EC=9E=88?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=EB=A7=8C=20=EC=A0=81=EC=9A=A9=20-=20isBla?= =?UTF-8?q?nk=20=EC=9C=A0=ED=8B=B8=20=EB=A9=94=EC=84=9C=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/PortalPropertyService.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/apim/portal/portalproperty/service/PortalPropertyService.java b/src/main/java/com/eactive/apim/portal/portalproperty/service/PortalPropertyService.java index e56af6b..b6cc942 100644 --- a/src/main/java/com/eactive/apim/portal/portalproperty/service/PortalPropertyService.java +++ b/src/main/java/com/eactive/apim/portal/portalproperty/service/PortalPropertyService.java @@ -51,13 +51,24 @@ public class PortalPropertyService extends AbstractDataService existingProperty = portalPropertyRepository.findById(propertyId); if (existingProperty.isPresent()) { - return existingProperty.get().getPropertyValue(); + PortalProperty property = existingProperty.get(); + // 설명(property_desc)이 비어 있으면 코드가 넘긴 description 으로 채운다. + // (값이 있으면 관리자 편집분 보존 — 덮어쓰지 않음) + if (isBlank(property.getPropertyDesc()) && !isBlank(description)) { + property.setPropertyDesc(description); + portalPropertyRepository.save(property); + } + return property.getPropertyValue(); } // 프로퍼티가 없으면 기본값으로 생성 return createDefaultProperty(groupName, propertyName, defaultValue, description); } + private static boolean isBlank(String s) { + return s == null || s.trim().isEmpty(); + } + /** * 기본 프로퍼티를 DB에 생성 */