RuntimeException -> MessageException 변경

상단 세션종료시간 절전모드 대응하여 로직 수정
dev
박성영 5 months ago
parent 4a00a7a293
commit fce213df50

@ -167,7 +167,7 @@ public class ApiResponseUtil {
* @return ResponseEntity
*/
public static ResponseEntity<ApiResponseEntity<Void>> error(String message) {
return error(message, "MESSAGE", HttpStatus.BAD_REQUEST);
return error(message, "MessageException", HttpStatus.BAD_REQUEST);
}
}

@ -1,5 +1,6 @@
package go.kr.project.system.menu.service.impl;
import egovframework.exception.MessageException;
import go.kr.project.system.menu.mapper.MenuMapper;
import go.kr.project.system.menu.model.MenuSearchVO;
import go.kr.project.system.menu.model.MenuVO;
@ -101,7 +102,7 @@ public class MenuServiceImpl extends EgovAbstractServiceImpl implements MenuServ
for (Map<String, Object> info : usageInfo) {
String roleId = (String) info.get("ROLE_ID");
String roleNm = (String) info.get("ROLE_NM");
String userGroupId = (String) info.get("USER_GROUP_ID");
String userGroupId = (String) info.get("GROUP_ID");
String groupNm = (String) info.get("GROUP_NM");
String userId = (String) info.get("USER_ID");
String userNm = (String) info.get("USER_NM");
@ -153,7 +154,7 @@ public class MenuServiceImpl extends EgovAbstractServiceImpl implements MenuServ
}
}
throw new RuntimeException(errorMsg.toString());
throw new MessageException(errorMsg.toString());
}
// 메뉴 정보 삭제

@ -99,7 +99,7 @@ public class RoleServiceImpl extends EgovAbstractServiceImpl implements RoleServ
Map<String, StringBuilder> groupUsers = new HashMap<>();
for (Map<String, Object> info : usageInfo) {
String userGroupId = (String) info.get("USER_GROUP_ID");
String userGroupId = (String) info.get("GROUP_ID");
String groupNm = (String) info.get("GROUP_NM");
String userId = (String) info.get("USER_ID");
String userNm = (String) info.get("USER_NM");

@ -890,7 +890,7 @@ $(document).ready(function() {
/**
* 세션 타이머 초기화 함수
* 세션 종료 시간을 매초 업데이트
* 세션 종료 시간을 매초 업데이트 (절전모드 대응)
*/
function initSessionTimer() {
// 초기 세션 시간 가져오기 (HH:mm:ss 형식)
@ -915,11 +915,21 @@ $(document).ready(function() {
}
// 초기 시간을 초로 변환
var remainingSeconds = timeToSeconds(initialTime);
var totalSeconds = timeToSeconds(initialTime);
// 절전모드 대응을 위한 시작 시간 기록 (절대 시간)
var startTime = Date.now();
// 1초마다 시간 업데이트
var timerInterval = setInterval(function() {
remainingSeconds--;
// 현재 시간 가져오기
var now = Date.now();
// 경과 시간 계산 (밀리초 -> 초)
var elapsed = Math.floor((now - startTime) / 1000);
// 남은 시간 계산
var remainingSeconds = totalSeconds - elapsed;
// 남은 시간이 0 이하면 타이머 중지
if (remainingSeconds <= 0) {

@ -7,7 +7,10 @@
<div class="bgs-main">
<section id="section5">
<div class="sub_title"></div>
<%-- 로그인 사용자가 시스템관리자가 아니면, 현재 조회중인 시스템관리자의 저장 및 비밀번호 초기화 불가능 --%>
<c:if test="${not (user.userGroupId eq 'GROUP_SYSTEM') || (sessionScope.sessionVO.isSystem())}">
<button class="newbtn bg4" type="button" id="btnSave">저장</button>
</c:if>
<button class="newbtn bg3" type="button" id="btnCancel">목록</button>
</section>
</div>
@ -73,6 +76,8 @@
</c:choose>
</th>
<td>
<%-- 로그인 사용자가 시스템관리자가 아니면, 시스템관리자의 저장 및 비밀번호 초기화 불가능 --%>
<c:if test="${not (user.userGroupId eq 'GROUP_SYSTEM') || (sessionScope.sessionVO.isSystem())}">
<c:choose>
<c:when test="${empty user.userId}">
<span>※ 최초 비밀번호는 'xitpassword'로 자동 설정됩니다.</span>
@ -82,6 +87,7 @@
<span class="ml10">※ 초기화 시 'xitpassword'로 설정됩니다.</span>
</c:otherwise>
</c:choose>
</c:if>
</td>
</tr>
<%--

Loading…
Cancel
Save