fix: 공지사항 반영

dev
Lim Jonguk 3 years ago
parent 5b8b787e6a
commit ee1aff0a35

@ -75,4 +75,15 @@ public class CtgyConstants {
private final String desc; private final String desc;
} }
@Getter
@AllArgsConstructor
public enum PublicBoard {
// 결과코드
GUBUN("1", "공지사항"),
;
private final String code;
private final String desc;
}
} }

@ -62,7 +62,7 @@ public class CtgyFileMgtController {
MinInfoBoard680 minInfoBoard680 = MinInfoBoard680.builder() MinInfoBoard680 minInfoBoard680 = MinInfoBoard680.builder()
.inCode(dto.getInCode()) .inCode(dto.getInCode())
.inBgubun(dto.getInBgubun()) .inDept(dto.getInDept())
.inTitle(dto.getInTitle()) .inTitle(dto.getInTitle())
.inContents(dto.getInContents()) .inContents(dto.getInContents())
.inFilename(dto.getInFilename()) .inFilename(dto.getInFilename())

@ -1,5 +1,6 @@
package com.xit.biz.ctgy.service.impl; 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.entity.MinInfoBoard680;
import com.xit.biz.ctgy.repository.IPublicBoardRepository; import com.xit.biz.ctgy.repository.IPublicBoardRepository;
import com.xit.biz.ctgy.service.ICtgyFileService; import com.xit.biz.ctgy.service.ICtgyFileService;
@ -89,7 +90,8 @@ public class CtgyFileService implements ICtgyFileService {
savedEntity.setInFilename(orgFileName); savedEntity.setInFilename(orgFileName);
savedEntity.setInFilesize(mf.getSize()); savedEntity.setInFilesize(mf.getSize());
savedEntity.setInFileurl(serviceUrl + urlPath); savedEntity.setInFileurl(serviceUrl + urlPath);
savedEntity.setInBgubun(entity.getInBgubun()); savedEntity.setInBgubun(CtgyConstants.PublicBoard.GUBUN.getCode());
savedEntity.setInDept(entity.getInDept());
savedEntity.setInTitle(entity.getInTitle()); savedEntity.setInTitle(entity.getInTitle());
savedEntity.setInContents(entity.getInContents()); savedEntity.setInContents(entity.getInContents());
@ -113,7 +115,8 @@ public class CtgyFileService implements ICtgyFileService {
} }
}else{ }else{
MinInfoBoard680 savedEntity = repository.findById(entity.getInCode()).orElseGet(MinInfoBoard680::new); 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.setInTitle(entity.getInTitle());
savedEntity.setInContents(entity.getInContents()); savedEntity.setInContents(entity.getInContents());
JpaUtil.saveIfNullId(savedEntity.getInCode(), repository, savedEntity); JpaUtil.saveIfNullId(savedEntity.getInCode(), repository, savedEntity);

Loading…
Cancel
Save