260115_01_ENH : 대표 템플릿 저장 구현 및 Front 연동 테스트 완료

This commit is contained in:
2026-01-15 11:32:35 +09:00
parent 739e635f08
commit c3ad6abf09
11 changed files with 255 additions and 21 deletions

View File

@@ -3,6 +3,7 @@ package com.kri.contact.server.controller;
import com.kri.common.datetime.DateTimeUtil;
import com.kri.common.webmvc.RequestUserContext;
import com.kri.common.webmvc.page.PageResponseDto;
import com.kri.contact.server.common.enums.ChannelType;
import com.kri.contact.server.dto.*;
import com.kri.contact.server.service.FileService;
import com.kri.contact.server.service.ProjectService;
@@ -57,6 +58,16 @@ public class ProjectController {
public ProjectOwnerResponseDto getOwnerList(RequestUserContext ctx) {
return projectService.getOwnerList(ctx.getUserRole());
}
//프로젝트 메인 발송 템플릿 조회 시 살아있는 템플릿인지 한번 검사하기
@Operation(summary = "프로젝트 대표 발송 템플릿 조회")
@GetMapping("/main-template/{prjctIdx}/{chnnlTy}")
public Long getMainTemplateIdx(
@PathVariable Long prjctIdx,
@PathVariable ChannelType chnnlTy
){
return projectService.getMainTemplateIdx(prjctIdx, chnnlTy.getCode());
}
@Operation(summary = "프로젝트 생성")
@PutMapping()
@@ -98,6 +109,18 @@ public class ProjectController {
systemEventLogService.writeUpdateProject(ctx.getUserId(), now, ctx.getClientIp(), prjctIdx, req);
}
@Operation(summary = "프로젝트 대표 발송 템플릿 지정")
@PatchMapping("/main-template")
public void updateProjectMainTemplate(
@Valid @RequestBody ProjectMainTemplateUpdateRequestDto req,
RequestUserContext ctx
) {
final LocalDateTime now = DateTimeUtil.nowKstLocalDateTime();
projectService.updateProjectMainTemplate(req, ctx.getUserId(), now);
systemEventLogService.writeUpdateDefaultMessageTemplate(ctx.getUserId(), now, ctx.getClientIp(), req);
}
@Operation(summary = "프로젝트 삭제(소프트 삭제)")
@DeleteMapping("/{prjctIdx}")
public void deleteProject(@PathVariable Long prjctIdx, RequestUserContext ctx) {