优化。

This commit is contained in:
chenxudong 2025-05-14 13:59:58 +08:00
parent d2219886a0
commit bee0344340
1 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,8 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
.eq(EdFileInfo::getDataType, EleDataTypeEnum.FILE.code)
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
.likeRight(EdFileInfo::getFilePath, prjId + MYSQL_FILE_PATH_SPLIT));
EdFileInfo prjFile = this.getById(prjId);
Assert.isTrue(DataOwnEnum.isPrjCode(prjFile.getDataOwn()), "删除目录非工程");
if (count > 0) {
String info = StrFormatter.format("禁止废除非空项目,废除失败。");
log.info(info);
@ -192,7 +193,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
ids.add(prjId);
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class).set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code).in(EdFileInfo::getId, ids));
// 对原文件进行处理
EdFileInfo prjFile = this.getById(prjId);
UserThreadLocal.setSuccessInfo("", prjId, "废除 {} 项目成功。", prjFile.getFileName());
return ElectromagneticResultUtil.success(true);
} catch (Exception e) {