사업자등록번호 유니크 문제 수정
This commit is contained in:
@@ -12,6 +12,11 @@ public interface PortalOrgRepository extends BaseRepository<PortalOrg, String> {
|
||||
|
||||
Optional<PortalOrg> findByCompRegNo(String compRegNo);
|
||||
|
||||
/**
|
||||
* 사업자등록번호 존재 여부 확인 (중복 데이터가 있어도 안전하게 처리)
|
||||
*/
|
||||
boolean existsByCompRegNo(String compRegNo);
|
||||
|
||||
long countByOrgStatusAndApprovalStatus(PortalOrgEnums.OrgStatus status, PortalOrgEnums.ApprovalStatus approvalStatus);
|
||||
|
||||
Optional<PortalOrg> findById(String orgId);
|
||||
|
||||
@@ -59,8 +59,8 @@ public class PortalOrgService {
|
||||
org.setApprovalStatus(ApprovalStatus.PENDING);
|
||||
}
|
||||
|
||||
// 사업자등록번호 중복 체크
|
||||
// 사업자등록번호 중복 체크 (Spring Data JPA의 existsBy 쿼리 사용 - 중복 데이터에도 안전)
|
||||
public boolean existsByCompRegNo(String compRegNo) {
|
||||
return portalOrgRepository.findByCompRegNo(compRegNo).isPresent();
|
||||
return portalOrgRepository.existsByCompRegNo(compRegNo);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kbank_base_layout}">
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout/kjbank_base_layout}">
|
||||
<body>
|
||||
<section layout:fragment="contentFragment" class="content">
|
||||
<div class="content_wrap">
|
||||
|
||||
Reference in New Issue
Block a user