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);