4 Commits

Author SHA1 Message Date
Rinjae ca44e8a967 - PortalProperty 설명 자동 채우기 로직 추가: 비어있을 때만 적용
- isBlank 유틸 메서드 추가
2026-07-03 16:55:05 +09:00
Rinjae ce3efa299e - StartupInfoPrinter 클래스 추가 - 서비스 시작 시 배너 출력
eapim-portal CI (from elink-portal-common) / build (push) Has been cancelled
- MessageCode 채널 필드 @Deprecated 추가 및 기본값 설정
- MessageCode 신규 생성자 추가 - channel 파라미터 제거
2026-07-01 10:37:08 +09:00
eastargh ad2ecb0b82 Merge branch 'master' of https://git.eactive.synology.me:8090/eapim/djbank/elink-portal-common.git
eapim-portal CI (from elink-portal-common) / build (push) Has been cancelled
2026-06-30 15:50:50 +09:00
eastargh f7bff90844 UMS발송시 user_id 추가 2026-06-30 15:50:25 +09:00
4 changed files with 26 additions and 4 deletions
@@ -51,13 +51,24 @@ public class PortalPropertyService extends AbstractDataService<PortalPropertyGro
Optional<PortalProperty> 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에 생성
*/
@@ -60,7 +60,8 @@ public enum MessageCode {
@Getter
private final String serviceId;
@Getter
private final int channels;
@Deprecated // 삭제 예정
private int channels = 0;
public static Optional<MessageCode> findServiceId(String code) {
@@ -72,6 +73,11 @@ public enum MessageCode {
return Optional.empty();
}
MessageCode(String description, String serviceId) {
this.description = description;
this.serviceId = serviceId;
// this.channels = channel.getValue();
}
MessageCode(String description, String serviceId, Channels channel) {
this.description = description;
@@ -59,8 +59,11 @@ public class MessageRequest implements Serializable {
@Convert(converter = PersonalDataEncryptConverter.class)
private String phone;
@Column(name = "user_id")
private String userId;
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "user_id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
@JoinColumn(name = "user_id", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
@NotFound(action = NotFoundAction.IGNORE)
@Comment("발송 대상 사용자")
private PortalUser user;
@@ -80,5 +83,4 @@ public class MessageRequest implements Serializable {
@Column(name = "service_id")
private String serviceId;
}
@@ -89,6 +89,7 @@ public class MessageSendService {
smsRequest.setPhone(user.getPhone());
smsRequest.setEaiInterfaceId(smsEaiInterfaceId);
smsRequest.setServiceId(portalProperties.get("ums.sms.tx_id"));
smsRequest.setUserId(user.getUserId());
if ("ADMIN_VERIFICATION_MOBILEPHONE".equals(template.getMessageCode().toUpperCase())) {
smsRequest.setMessageType("KAKAO");
} else {
@@ -111,6 +112,7 @@ public class MessageSendService {
emailRequest.setEaiInterfaceId(mailEaiInterfaceId);
emailRequest.setServiceId(portalProperties.get("ums.email.tx_id"));
emailRequest.setMessageType("EMAIL");
emailRequest.setUserId(user.getUserId());
messageRequestRepository.save(emailRequest);
logger.debug(emailRequest.toString());
}
@@ -128,6 +130,7 @@ public class MessageSendService {
messengerRequest.setEaiInterfaceId(swingEaiInterfaceId);
messengerRequest.setServiceId(portalProperties.get("ums.messenger.tx_id"));
messengerRequest.setMessageType("MESSENGER");
messengerRequest.setUserId(user.getUserId());
messageRequestRepository.save(messengerRequest);
logger.debug(messengerRequest.toString());
}