251210_01_ENH: Project CRUD 구현 및 테스트 진행중
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package com.kri.contact.server.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.kri.contact.server.dto.ProjectCreateRequestDto;
|
||||
import com.kri.contact.server.dto.ProjectInfoDto;
|
||||
import com.kri.contact.server.dto.UserInfoDto;
|
||||
import com.kri.contact.server.dto.systemlog.ProjectIdxContentDto;
|
||||
import com.kri.contact.server.dto.systemlog.UploadUserContentDto;
|
||||
import com.kri.contact.server.dto.systemlog.UserIdContentDto;
|
||||
import com.kri.contact.server.common.enums.SystemEventType;
|
||||
@@ -9,7 +12,9 @@ import com.kri.contact.server.persistence.entity.TSysEventLogEntity;
|
||||
import com.kri.contact.server.persistence.repository.SystemEventLogRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.kri.common.json.JsonUtil.toMap;
|
||||
@@ -47,7 +52,25 @@ public class SystemEventLogService {
|
||||
writeSystemLog(SystemEventType.DELETE_USER, "Delete User", null, regId, clientIp, content);
|
||||
}
|
||||
|
||||
private <T> void writeSystemLog(
|
||||
public void writeCreateProject(String regId, String clientIp, Long prjctIdx, ProjectCreateRequestDto req){
|
||||
writeSystemLog(SystemEventType.CREAT_PROJECT, "Create Project", prjctIdx, regId, clientIp, req);
|
||||
}
|
||||
|
||||
public void writeUpdateProject(String regId, String clientIp, Long prjctIdx, ProjectInfoDto req){
|
||||
writeSystemLog(SystemEventType.UPDATE_PROJECT, "Update Project", prjctIdx, regId, clientIp, req);
|
||||
}
|
||||
|
||||
public void writeDeleteProject(String regId, String clientIp, Long prjctIdx){
|
||||
ProjectIdxContentDto content = new ProjectIdxContentDto(prjctIdx);
|
||||
writeSystemLog(SystemEventType.DELETE_PROJECT, "Delete Project", prjctIdx, regId, clientIp, content);
|
||||
}
|
||||
|
||||
public void writeAssignProjectOutsource(String regId, String clientIp, Long prjctIdx, List<String> assignUserIdList){
|
||||
writeSystemLog(SystemEventType.ASSIGN_PROJECT_OUTSOURCE, "Assign Project Outsource User", prjctIdx, regId, clientIp, assignUserIdList);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
protected <T> void writeSystemLog(
|
||||
SystemEventType eventType,
|
||||
String title,
|
||||
Long prjctIdx,
|
||||
|
||||
Reference in New Issue
Block a user