Merge branch 'dev' into deploy-dev-admin

This commit is contained in:
주수현
2025-06-27 10:22:34 +09:00
12 changed files with 26 additions and 15 deletions

View File

@@ -48,8 +48,8 @@ public class AdminCreateValidator implements Validator {
if (vo.getName() == null || vo.getName().isBlank()) {
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
}
if (vo.getName().length() > 4) {
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다.");
if (vo.getName().length() > 10) {
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
}
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");

View File

@@ -34,8 +34,8 @@ public class AdminUpdateValidator implements Validator {
if (vo.getName() == null || vo.getName().isBlank()) {
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
}
if (vo.getName().length() > 4) {
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다.");
if (vo.getName().length() > 10) {
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
}
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");

View File

@@ -115,4 +115,5 @@ public class ResearcherDao implements ResearcherPortOut {
}
return i;
}
}

View File

@@ -17,6 +17,7 @@ import java.util.Objects;
@RequiredArgsConstructor
@RequestMapping(path = "/api/researcher")
class ResearcherApiController {
private final ResearcherPortIn researcherPortIn;
@GetMapping(path = "/list")
@@ -63,4 +64,5 @@ class ResearcherApiController {
ResponseEntity<?> updateMappingHousehold(@RequestBody MappingHouseholdListReqVO reqVO ) {
return ResponseEntity.status(HttpStatus.OK).body(researcherPortIn.updateMappingHousehold(reqVO));
}
}

View File

@@ -7,6 +7,7 @@ import org.springframework.data.domain.Page;
import java.util.List;
public interface ResearcherPortIn {
Page<ResearchersDto> list(ResearchersListReqVO reqVO);
ResearchersDto detail(Integer adminSeq);
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
@@ -17,4 +18,5 @@ public interface ResearcherPortIn {
Integer visitHouseholdDelete(List<Integer> selectIds);
Page<GetPopupHouseholds> searchMappingHousehold(HouseholdSearchReqVO reqVO);
Integer updateMappingHousehold(MappingHouseholdListReqVO reqVO);
}

View File

@@ -64,9 +64,9 @@ app:
permit: 5
session:
validity:
# 세션 유효기간(초) - 1시간 (3600초)
# 세션 유효기간(초) - 무한정으로 수정,,,
period:
seconds: 3600
seconds: -1
maximum:
# 최대 세션 갯수 (1일 경우 중복 로그인 불가)
num: 1

View File

@@ -19,6 +19,9 @@
left join household h ON h.seq = rhh.household_seq AND h.is_panel IS true and h.is_deleted = false
where
ahr.role_id = 'ROLE_RESEARCHER'
<if test="searchField == '' and searchValue != null and searchValue != ''">
and ( a.name LIKE CONCAT('%', #{searchValue}, '%') or a.phone LIKE CONCAT('%', #{searchValue}, '%') )
</if>
<if test="searchField == 'name' and searchValue != null and searchValue != ''">
and a.name LIKE CONCAT('%', #{searchValue}, '%')
</if>

View File

@@ -79,7 +79,7 @@
<div class="input-field">
<input id="name" type="text" name="name"
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
th:field="*{name}"/>
th:field="*{name}" maxlength="10"/>
<div class="invalid-feedback fw-bold"
th:if="${#fields.hasErrors('name')}">
에러 메세지
@@ -97,12 +97,12 @@
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}">
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}" maxlength="4">
</div>
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}">
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}" maxlength="4">
</div>
</div>
</div>

View File

@@ -165,7 +165,6 @@
f.searchDisabled.value = '';
}
function goUpdate(adminId) {
location.href = '/settings/admins/update/' + adminId; // 쿼리 파라미터 없이 이동
}

View File

@@ -71,7 +71,7 @@
<div class="input-field">
<input id="name" type="text" name="name"
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
th:field="*{name}"/>
th:field="*{name}" maxlength="10" />
<div class="invalid-feedback fw-bold"
th:if="${#fields.hasErrors('name')}">
에러 메세지
@@ -89,7 +89,7 @@
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="phone1" name="phone1" placeholder=""
<input type="number" id="phone1" name="phone1" placeholder="" maxlength="4"
th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}">
</div>
</div>
@@ -99,7 +99,7 @@
</div>
<div class="component-input">
<div class="input-field">
<input type="number" id="phone2" name="phone2" placeholder=""
<input type="number" id="phone2" name="phone2" placeholder="" maxlength="4"
th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}">
</div>
</div>

View File

@@ -25,7 +25,7 @@
</div>
<div class="component-input">
<div class="input-field">
<input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요.">
<input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요." onkeypress="if(event.key === 'Enter') goSearch();">
</div>
</div>
</div>
@@ -181,6 +181,8 @@
f.searchValue.value = '';
f.searchArea.value = '';
f.searchAccountDisabled.value = '';
f.method = 'GET';
f.submit();
}
// 상세페이지 이동
function goDetail(seq) {

View File

@@ -101,7 +101,9 @@ public class FrontSecurityConfig {
.clearAuthentication(true)
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")))
.sessionManagement(
session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false))
session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false).expiredUrl("/login"))
.sessionManagement(
session -> session.invalidSessionUrl("/login"))
.oauth2Login(
config ->
config