서버 등록시 중복체크
eapim-admin CI / build (push) Waiting to run

This commit is contained in:
eastargh
2026-07-16 14:52:36 +09:00
parent 21c493cb0e
commit 70c2ac8376
@@ -17,6 +17,7 @@ import com.eactive.eai.data.entity.onl.server.EAIServer;
import com.eactive.eai.rms.common.base.OnlBaseService;
import com.eactive.eai.rms.data.entity.onl.adapter.AdapterGroupService;
import com.eactive.eai.rms.data.entity.onl.server.EAIServerService;
import com.eactive.eai.rms.onl.common.exception.BizException;
@Service
@Transactional
@@ -78,6 +79,11 @@ public class ServerManService extends OnlBaseService {
}
public void insert(EAIServerUI eaiServerUI) {
String eaiSevrInstncName = eaiServerUI.getEaiSevrInstncName();
if (eaiServerService.existsById(eaiSevrInstncName)) {
throw new BizException("서버 인스턴스명[" + eaiSevrInstncName + "]은 이미 등록되어 있습니다.");
}
EAIServer eaiServer = eaiServerUIMapper.toEntity(eaiServerUI);
eaiServerService.save(eaiServer);
}