bug修复
This commit is contained in:
+12
-3
@@ -427,11 +427,20 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
Long id = templateManage.getId();
|
||||
templateManage.setUpdateBy(getUsername());
|
||||
int i = templateManageMapper.updateTemplateManage(templateManage);
|
||||
|
||||
// 先删除附件
|
||||
if (CollectionUtil.isNotEmpty(templateManage.getAnnexIds())) {
|
||||
templateManageMapper.deleteTemplateManageFileById(id, templateManage.getAnnexIds());
|
||||
// 修改附件表
|
||||
templateManageMapper.updateFileByIds(templateManage);
|
||||
// 根据附件id查询附件类型
|
||||
List<TemplateManage> templateManages = templateManageMapper.selectTemplateListByIds(templateManage.getAnnexIds());
|
||||
if(CollectionUtil.isNotEmpty(templateManages)) {
|
||||
List<Integer> types = templateManages.stream().map(TemplateManage::getTemType).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(types)) {
|
||||
// 根据模板id和类型删除附件
|
||||
templateManageMapper.deleteTemplateManageFileByIdAndType(id, types);
|
||||
// 修改附件表
|
||||
templateManageMapper.updateFileByIds(templateManage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
|
||||
Reference in New Issue
Block a user