From ee1aff0a35eb7d0d9c4e36b98ccbd34b829bb909 Mon Sep 17 00:00:00 2001 From: Lim Jonguk Date: Tue, 29 Mar 2022 19:32:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xit/biz/ctgy/CtgyConstants.java | 11 +++++++++++ .../biz/ctgy/controller/CtgyFileMgtController.java | 2 +- .../xit/biz/ctgy/service/impl/CtgyFileService.java | 7 +++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xit/biz/ctgy/CtgyConstants.java b/src/main/java/com/xit/biz/ctgy/CtgyConstants.java index 2eab432..57eb576 100644 --- a/src/main/java/com/xit/biz/ctgy/CtgyConstants.java +++ b/src/main/java/com/xit/biz/ctgy/CtgyConstants.java @@ -75,4 +75,15 @@ public class CtgyConstants { private final String desc; } + @Getter + @AllArgsConstructor + public enum PublicBoard { + // 결과코드 + GUBUN("1", "공지사항"), + + ; + + private final String code; + private final String desc; + } } diff --git a/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java b/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java index d5abede..06fda6b 100644 --- a/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java +++ b/src/main/java/com/xit/biz/ctgy/controller/CtgyFileMgtController.java @@ -62,7 +62,7 @@ public class CtgyFileMgtController { MinInfoBoard680 minInfoBoard680 = MinInfoBoard680.builder() .inCode(dto.getInCode()) - .inBgubun(dto.getInBgubun()) + .inDept(dto.getInDept()) .inTitle(dto.getInTitle()) .inContents(dto.getInContents()) .inFilename(dto.getInFilename()) diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java b/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java index 6daa30f..c072571 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/CtgyFileService.java @@ -1,5 +1,6 @@ package com.xit.biz.ctgy.service.impl; +import com.xit.biz.ctgy.CtgyConstants; import com.xit.biz.ctgy.entity.MinInfoBoard680; import com.xit.biz.ctgy.repository.IPublicBoardRepository; import com.xit.biz.ctgy.service.ICtgyFileService; @@ -89,7 +90,8 @@ public class CtgyFileService implements ICtgyFileService { savedEntity.setInFilename(orgFileName); savedEntity.setInFilesize(mf.getSize()); savedEntity.setInFileurl(serviceUrl + urlPath); - savedEntity.setInBgubun(entity.getInBgubun()); + savedEntity.setInBgubun(CtgyConstants.PublicBoard.GUBUN.getCode()); + savedEntity.setInDept(entity.getInDept()); savedEntity.setInTitle(entity.getInTitle()); savedEntity.setInContents(entity.getInContents()); @@ -113,7 +115,8 @@ public class CtgyFileService implements ICtgyFileService { } }else{ MinInfoBoard680 savedEntity = repository.findById(entity.getInCode()).orElseGet(MinInfoBoard680::new); - savedEntity.setInBgubun(entity.getInBgubun()); + savedEntity.setInBgubun(CtgyConstants.PublicBoard.GUBUN.getCode()); + savedEntity.setInDept(entity.getInDept()); savedEntity.setInTitle(entity.getInTitle()); savedEntity.setInContents(entity.getInContents()); JpaUtil.saveIfNullId(savedEntity.getInCode(), repository, savedEntity);