优化。
This commit is contained in:
parent
d2219886a0
commit
bee0344340
|
|
@ -177,7 +177,8 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
||||||
.eq(EdFileInfo::getDataType, EleDataTypeEnum.FILE.code)
|
.eq(EdFileInfo::getDataType, EleDataTypeEnum.FILE.code)
|
||||||
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
|
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
|
||||||
.likeRight(EdFileInfo::getFilePath, prjId + MYSQL_FILE_PATH_SPLIT));
|
.likeRight(EdFileInfo::getFilePath, prjId + MYSQL_FILE_PATH_SPLIT));
|
||||||
|
EdFileInfo prjFile = this.getById(prjId);
|
||||||
|
Assert.isTrue(DataOwnEnum.isPrjCode(prjFile.getDataOwn()), "删除目录非工程");
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
String info = StrFormatter.format("禁止废除非空项目,废除失败。");
|
String info = StrFormatter.format("禁止废除非空项目,废除失败。");
|
||||||
log.info(info);
|
log.info(info);
|
||||||
|
|
@ -192,7 +193,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
||||||
ids.add(prjId);
|
ids.add(prjId);
|
||||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class).set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code).in(EdFileInfo::getId, ids));
|
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());
|
UserThreadLocal.setSuccessInfo("", prjId, "废除 {} 项目成功。", prjFile.getFileName());
|
||||||
return ElectromagneticResultUtil.success(true);
|
return ElectromagneticResultUtil.success(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue