Merge branch 'dev' into first_open_fetch
# Conflicts: # README.md # admin/src/main/resources/mappers/researcher/ResearcherMapper.xml # core/src/main/java/app/module/core/usecase/file/updateFile/adapters/persistence/UpdateFileDao.java
This commit is contained in:
@@ -81,8 +81,6 @@ public class AdminURIInterceptor implements HandlerInterceptor {
|
||||
return;
|
||||
}
|
||||
|
||||
// 활성 프로파일 가져오기 TODO 2차 오픈시 삭제 예정
|
||||
modelAndView.addObject("activeProfile", activeProfiles);
|
||||
|
||||
String roleId = AdminUtil.getLoginUserRole();
|
||||
if (!CommonUtil.isAjaxRequest(request)) {
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
package app.module.admin.config.application.aop;
|
||||
|
||||
import app.module.core.config.application.enums.AppType;
|
||||
import app.module.core.config.application.enums.OperationLogType;
|
||||
import app.module.core.config.application.util.CommonUtil;
|
||||
import app.module.core.config.application.util.MessageUtil;
|
||||
import app.module.core.usecase.operationlog.save.application.domain.OperationLogSaveCommand;
|
||||
import app.module.core.usecase.operationlog.save.application.port.in.OperationLogSavePortIn;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
@@ -18,21 +13,12 @@ import org.springframework.stereotype.Component;
|
||||
@RequiredArgsConstructor
|
||||
public class LoginFailAspect {
|
||||
|
||||
private final OperationLogSavePortIn operationLogSavePortIn;
|
||||
private final MessageUtil messageUtil;
|
||||
|
||||
@After("@annotation(app.module.admin.config.application.aop.LoginFailOperateLog)")
|
||||
public void operate(JoinPoint joinPoint) throws Throwable {
|
||||
Object[] args = joinPoint.getArgs();
|
||||
HttpServletRequest request = (HttpServletRequest) args[0];
|
||||
String targetId = request.getParameter("username");
|
||||
|
||||
operationLogSavePortIn.connect(
|
||||
new OperationLogSaveCommand(
|
||||
AppType.ADMIN,
|
||||
OperationLogType.LOGIN_FAIL,
|
||||
targetId,
|
||||
CommonUtil.getClientIP(request),
|
||||
messageUtil.getMessage("operate.login.fail", targetId)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ import app.module.core.config.application.enums.AppType;
|
||||
import app.module.core.config.application.enums.OperationLogType;
|
||||
import app.module.core.config.application.util.CommonUtil;
|
||||
import app.module.core.config.application.util.MessageUtil;
|
||||
import app.module.core.usecase.operationlog.save.application.domain.OperationLogSaveCommand;
|
||||
import app.module.core.usecase.operationlog.save.application.port.in.OperationLogSavePortIn;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -20,8 +18,6 @@ import org.springframework.stereotype.Component;
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
public class LoginSuccessAspect {
|
||||
|
||||
private final OperationLogSavePortIn operationLogSavePortIn;
|
||||
private final MessageUtil messageUtil;
|
||||
|
||||
@After("@annotation(app.module.admin.config.application.aop.LoginSuccessOperateLog)")
|
||||
@@ -31,12 +27,5 @@ public class LoginSuccessAspect {
|
||||
HttpServletRequest request = (HttpServletRequest) args[0];
|
||||
Authentication authentication = (Authentication) args[2];
|
||||
|
||||
operationLogSavePortIn.connect(
|
||||
new OperationLogSaveCommand(
|
||||
AppType.ADMIN,
|
||||
OperationLogType.LOGIN_SUCCESS,
|
||||
null,
|
||||
CommonUtil.getClientIP(request),
|
||||
messageUtil.getMessage("operate.login.success", authentication.getName())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ import app.module.core.config.application.enums.OperationLogType;
|
||||
import app.module.core.config.application.util.CommonUtil;
|
||||
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
||||
import app.module.core.usecase.admin.view.ports.application.domain.AdminView;
|
||||
import app.module.core.usecase.operationlog.save.application.domain.OperationLogSaveCommand;
|
||||
import app.module.core.usecase.operationlog.save.application.port.in.OperationLogSavePortIn;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
@@ -27,7 +25,6 @@ import java.util.Optional;
|
||||
public class RoleUpdateAspect {
|
||||
|
||||
private final AdminViewPortIn adminViewPortIn;
|
||||
private final OperationLogSavePortIn operationLogSavePortIn;
|
||||
|
||||
@Around(
|
||||
"execution(* app.module.core.usecase.admin.saveAdmin.ports.application.SaveAdminService.connect(..))")
|
||||
@@ -54,34 +51,7 @@ public class RoleUpdateAspect {
|
||||
// .map(adminUserWithRole -> adminUserWithRole.getRole().getId())
|
||||
// .collect(Collectors.toList());
|
||||
|
||||
boolean createLog = false;
|
||||
|
||||
if (beforeAdmin.isPresent()) {
|
||||
List<String> beforeRoles =
|
||||
beforeAdmin.stream().map(r -> r.getRole().getId()).toList();
|
||||
if (beforeRoles.size() != currentRoles.size()
|
||||
|| currentRoles.stream().anyMatch(item -> !beforeRoles.contains(item))) {
|
||||
createLog = true;
|
||||
}
|
||||
} else if (!currentRoles.isEmpty()) {
|
||||
createLog = true;
|
||||
}
|
||||
|
||||
if (createLog) {
|
||||
String operatorId = Optional.ofNullable(CommonUtil.getLoginUsername())
|
||||
.orElse("init data");
|
||||
HttpServletRequest request = CommonUtil.getRequest();
|
||||
|
||||
operationLogSavePortIn.connect(
|
||||
new OperationLogSaveCommand(
|
||||
AppType.ADMIN,
|
||||
OperationLogType.ROLE_UPDATE,
|
||||
adminId,
|
||||
request != null ? CommonUtil.getClientIP(request) : null,
|
||||
String.format(
|
||||
"`%s` grants [%s] permissions to `%s`",
|
||||
operatorId, StringUtils.join(currentRoles, ", "), adminId)));
|
||||
}
|
||||
|
||||
return joinPoint.proceed();
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import app.module.core.config.application.util.MessageUtil;
|
||||
import app.module.core.usecase.admin.status.ports.AdminUpdateAccountLockPortIn;
|
||||
import app.module.core.usecase.admin.status.ports.AdminUpdateLoginFailPortIn;
|
||||
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
||||
import app.module.core.usecase.operationlog.save.application.domain.OperationLogSaveCommand;
|
||||
import app.module.core.usecase.operationlog.save.application.port.in.OperationLogSavePortIn;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -31,7 +29,6 @@ public class AdminAuthFailEvent {
|
||||
private final AdminViewPortIn adminViewPortIn;
|
||||
private final AdminUpdateLoginFailPortIn updateLoginFailPortIn;
|
||||
private final AdminUpdateAccountLockPortIn updateAccountLockPortIn;
|
||||
private final OperationLogSavePortIn operationLogSavePortIn;
|
||||
private final MessageUtil messageUtil;
|
||||
@Value("${app.admin.auth.fail.permit}")
|
||||
private int failPermit;
|
||||
@@ -61,15 +58,6 @@ public class AdminAuthFailEvent {
|
||||
request.getSession(),
|
||||
messageUtil.getMessage("security.auth.fail.exceed", failPermit));
|
||||
|
||||
// 계정 잠금 로그 기록
|
||||
operationLogSavePortIn.connect(
|
||||
new OperationLogSaveCommand(
|
||||
AppType.ADMIN,
|
||||
OperationLogType.ACCOUNT_LOCKED,
|
||||
adminUserViewInfo.getId(),
|
||||
CommonUtil.getClientIP(request),
|
||||
messageUtil.getMessage(
|
||||
"operate.account.locked", adminUserViewInfo.getId())));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.module.admin.usecase.communication.notice.getNotice.ports.application.domain;
|
||||
|
||||
import app.module.core.config.application.enums.FileUploadType;
|
||||
import app.module.core.usecase.file.model.UploadFile;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -9,7 +10,7 @@ import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* DTO for {@link app.module.core.config.adapters.persistence.entity.UploadFile}
|
||||
* DTO for {@link UploadFile}
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -48,16 +48,6 @@ public class CreateHouseholdValidator implements Validator {
|
||||
return;
|
||||
}
|
||||
|
||||
// 4. 가구 연락처
|
||||
// TODO : 필수입력값 맞는지 체크
|
||||
// if (!StringUtils.hasText(vo.getTel1()) || !StringUtils.hasText(vo.getTel2()) || !StringUtils.hasText(vo.getTel3())) {
|
||||
// errors.reject("tel", "가구 연락처를 모두 입력해주세요.");
|
||||
// return;
|
||||
// }
|
||||
// if (vo.getTel2().length() > 4 || vo.getTel3().length() > 4) {
|
||||
// errors.reject("tel", "가구 연락처는 각 4자리까지 입력 가능합니다.");
|
||||
// return;
|
||||
// }
|
||||
if (StringUtils.hasText(vo.getTel2()) || StringUtils.hasText(vo.getTel3())) {
|
||||
if ((vo.getTel2() != null && vo.getTel2().length() > 4) ||
|
||||
(vo.getTel3() != null && vo.getTel3().length() > 4)) {
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
/* 맵핑 여부 */
|
||||
<choose>
|
||||
<when test="cmd.isMapping">
|
||||
AND hvr.researcher_name is not null
|
||||
AND hvr.researcher_name is not null
|
||||
</when>
|
||||
<when test="!cmd.isMapping">
|
||||
AND hvr.researcher_name is null
|
||||
|
||||
@@ -136,7 +136,6 @@ var ajaxUtil = {
|
||||
|
||||
if (options.handle422Type === 'field' || !options.handle422Type) {
|
||||
$(rstData.responseJSON).each((idx, oj) => {
|
||||
// TODO : form id? or body
|
||||
let target = $('body').find('[name=' + oj.field + ']');
|
||||
target.addClass('is-invalid');
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
const tbody = $('.tab-content.forest-product tbody');
|
||||
tbody.empty();
|
||||
|
||||
// TODO(ks) : monthlyStatus 없을 경우 처리 추가... 일단 .. 이렇게 처리 하지만.. 또 다른 방안이 있을지...
|
||||
if (!response.monthlyStatus || !response.monthlyStatus.forestStatus) {
|
||||
noDataMonthly(tbody, null, 15);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user