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 @@ - +