fix: 파일 삭제 누락 부분 fix

dev
Jonguk. Lim 5 months ago
parent 75e9601a0b
commit c7040ac7a0

@ -88,13 +88,5 @@ public interface BizNimsMapper extends AbstractMapper {
void deleteDsuseMgtDtl(final String dscdmngId); void deleteDsuseMgtDtl(final String dscdmngId);
//List<NimsApiDto.DsuseRptInfoDtl> selectDsuseRptInfoDtls(final Map<String, String> map); void deleteFileInfo(final Map<String, String> map);
//List<BizNimsResponse.DsuseRptInfoRes> selectSavedDsuseMgts(final List<String> dsuseMgtIds);
// int insertDsuseMgtDtl(BizNimsDto.DsuseMgtDtl dto);
// int updateCancelDsuseMgtDtl(BizNimsRequest.DsuseMgt dto);
// BizNimsAarDto.AarHeader selectTgtAarHeader(BizNimsRequest.DsuseMgt dto);
// List<BizNimsAarDto.AarDetail> selectTgtAarDetails(BizNimsRequest.DsuseMgt dto);
} }

@ -323,12 +323,14 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
if(bizNimsMapper.updateDsuseMgtRslt(reqDto) == 1){ if(bizNimsMapper.updateDsuseMgtRslt(reqDto) == 1){
if("Y".equals(fileChangeYn)) { if("Y".equals(fileChangeYn)) {
Map<String, String> map = Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_IMG.getCode(), "infKey", reqDto.getDscdmngId());
// 파일 삭제 // 파일 삭제
String[] fileIds = bizNimsMapper.selectFileId( String[] fileIds = bizNimsMapper.selectFileId(map);
Map.of("infType", Constants.FILE_INF_TYPE.DSUSE_IMG.getCode(), "infKey", reqDto.getDscdmngId()));
if (fileIds.length > 0) { if (fileIds.length > 0) {
fileService.delete(fileIds); fileService.delete(fileIds);
} }
// DB 파일 정보 삭제
bizNimsMapper.deleteFileInfo(map);
int idx = 1; int idx = 1;
for (MultipartFile mf : files) { for (MultipartFile mf : files) {

@ -746,7 +746,15 @@
</if> </if>
</select> </select>
<select id="deleteFileInfo" parameterType="map">
/** nims-mysql-mapper|deleteFileInfo 파일삭제|julim */
DELETE FROM tb_file
WHERE INF_TYPE = #{infType}
AND INF_KEY = #{infKey}
<if test="subType != null and subType != ''">
AND SUB_TYPE = #{subType}
</if>
</select>

Loading…
Cancel
Save