禅道bug修复

This commit is contained in:
hongchao 2025-04-17 17:54:04 +08:00
parent 422ff90370
commit c3b5949935
3 changed files with 14 additions and 2 deletions

View File

@ -51,6 +51,14 @@ public interface BmFileInfoMapper {
*/
int deleteBmFileInfoById(Long id);
/**
* 删除附件
*
* @param modelId 附件主键
* @return 结果
*/
int deleteBmFileInfoByModelId(Long modelId);
/**
* 批量删除附件

View File

@ -152,7 +152,8 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService
Long rs = sltAgreementRecudceMapper.updateReduce(sltAgreement);
Long id = sltAgreement.getId();
AtomicBoolean addFileInfoResult = new AtomicBoolean(false);
//删除之前的附件
bmFileInfoMapper.deleteBmFileInfoByModelId(id);
if(sltAgreement.getBmFileInfos()!=null){
sltAgreement.getBmFileInfos().forEach(bmFileInfo -> {
bmFileInfo.setModelId(id);
@ -281,7 +282,6 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService
temp.add(
current
);
}
}

View File

@ -95,6 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from bm_file_info where id = #{id}
</delete>
<delete id="deleteBmFileInfoByModelId" parameterType="Long">
delete from bm_file_info where model_id = #{modelId}
</delete>
<delete id="deleteBmFileInfoByIds" parameterType="String">
delete from bm_file_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">