From c7040ac7a0a9d16e65cfd073b9896913af70a2fb Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Tue, 2 Jul 2024 14:45:44 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=20=EB=88=84=EB=9D=BD=20=EB=B6=80=EB=B6=84=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java | 10 +--------- .../adds/biz/nims/service/bean/BizNimsServiceBean.java | 6 ++++-- .../resources/sql/mapper/biz/nims-mysql-mapper.xml | 10 +++++++++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java b/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java index 26658b5..3feeef1 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java +++ b/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java @@ -88,13 +88,5 @@ public interface BizNimsMapper extends AbstractMapper { void deleteDsuseMgtDtl(final String dscdmngId); - //List selectDsuseRptInfoDtls(final Map map); - - - //List selectSavedDsuseMgts(final List dsuseMgtIds); - // int insertDsuseMgtDtl(BizNimsDto.DsuseMgtDtl dto); - // int updateCancelDsuseMgtDtl(BizNimsRequest.DsuseMgt dto); - - // BizNimsAarDto.AarHeader selectTgtAarHeader(BizNimsRequest.DsuseMgt dto); - // List selectTgtAarDetails(BizNimsRequest.DsuseMgt dto); + void deleteFileInfo(final Map map); } diff --git a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java index a225612..40859a2 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java +++ b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java @@ -323,12 +323,14 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe if(bizNimsMapper.updateDsuseMgtRslt(reqDto) == 1){ if("Y".equals(fileChangeYn)) { + Map map = Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_IMG.getCode(), "infKey", reqDto.getDscdmngId()); // 파일 삭제 - String[] fileIds = bizNimsMapper.selectFileId( - Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_IMG.getCode(), "infKey", reqDto.getDscdmngId())); + String[] fileIds = bizNimsMapper.selectFileId(map); if (fileIds.length > 0) { fileService.delete(fileIds); } + // DB 파일 정보 삭제 + bizNimsMapper.deleteFileInfo(map); int idx = 1; for (MultipartFile mf : files) { diff --git a/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml index af08664..99fdda4 100644 --- a/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml @@ -746,7 +746,15 @@ - +