260115_01_ENH : 대표 템플릿 저장 구현 및 Front 연동 테스트 완료
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user