删除无用代码。
This commit is contained in:
parent
4052d9b0ea
commit
e91fb07dff
|
|
@ -291,8 +291,6 @@ public class CommonService {
|
|||
|
||||
public ElectromagneticResult<?> deleteFolder(String id, int dataOwnCode) {
|
||||
// 如果文件夹下存在文件(包括文件夹和已经逻辑删除的文件),则不允许删除。后面管理员选择会有物理删除文件夹和文件的功能,此时MySQL和文件系统则会进行物理删除该文件。
|
||||
Date now = new Date();
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
EdFileInfo srcFileInfo = edFileInfoMapper.selectById(id);
|
||||
String srcPrjName = srcFileInfo.getFileName();
|
||||
String srcFilePath = getFileSysPath(srcFileInfo.getFilePath(), dataOwnCode);
|
||||
|
|
|
|||
|
|
@ -211,8 +211,6 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
UserThreadLocal.setSuccessInfo(fileInfo.getParentId(), id, "作废目录 {} 成功", fileInfo.getFileName());
|
||||
return res;
|
||||
}
|
||||
Date now = new Date();
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getEffectFlag, false)
|
||||
.set(EdFileInfo::getAllDeleted, true)
|
||||
|
|
@ -301,8 +299,6 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
}
|
||||
|
||||
String srcFilePath = commonService.getFileSysPath(fileInfo.getFilePath(), dataOwnCode);
|
||||
Date now = new Date();
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, updateFileInfoDTO.getId())
|
||||
.set(EdFileInfo::getFileName, updateFileInfoDTO.getFileName())
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import com.electromagnetic.industry.software.common.util.ElectromagneticResultUt
|
|||
import com.electromagnetic.industry.software.common.util.UserThreadLocal;
|
||||
import com.electromagnetic.industry.software.manage.mapper.EdFileInfoMapper;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.EdFileInfo;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.User;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.FolderResortDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.QueryPublishStatus;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.ProjectVO;
|
||||
|
|
@ -82,8 +81,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
String maxPrjId = this.baseMapper.maxPrjId();
|
||||
int prjCount = this.baseMapper.selectCount(Wrappers.lambdaQuery(EdFileInfo.class).eq(EdFileInfo::getParentId, PRJ_PARENT_ID)).intValue();
|
||||
int id = Integer.parseInt(StrUtil.isEmpty(maxPrjId) ? "100000" : maxPrjId);
|
||||
Date now = new Date();
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
String newPrjId = String.valueOf(id + 1);
|
||||
|
||||
EdFileInfo fileInfo = new EdFileInfo();
|
||||
|
|
@ -282,8 +279,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
public ElectromagneticResult<?> publish(String prjId, int dataOwnCode) {
|
||||
EdFileInfo fileInfo = this.baseMapper.selectById(prjId);
|
||||
try {
|
||||
Date now = new Date();
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
// 将已经处于删除状态设置成逻辑删除
|
||||
LambdaQueryWrapper<EdFileInfo> queryWrapper = Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo::getId, EdFileInfo::getFilePath)
|
||||
|
|
@ -340,7 +335,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
public ElectromagneticResult<?> follow(String sourceId, String targetId, int dataOwnCode) {
|
||||
|
||||
try {
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
// 把source工程的层级结构copy到目标工程
|
||||
// 查找source的全部目录
|
||||
List<EdFileInfo> sourceEdFileInfos = commonService.selectAllAdminFolder(sourceId, null, dataOwnCode);
|
||||
|
|
@ -436,8 +430,6 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
String parentId = this.baseMapper.selectById(id).getParentId();
|
||||
// 首先检查同层是否有同名目录
|
||||
Assert.isTrue(commonService.notExistSameFolder(parentId, newFolderName, dataOwnCode), StrFormatter.format("{} 子集名已经存在", newFolderName));
|
||||
String currentUserId = UserThreadLocal.getUserId();
|
||||
Date now = new Date();
|
||||
EdFileInfo fileInfo = this.baseMapper.selectOne(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, id));
|
||||
String sysFilePath = commonService.getFileSysPath(fileInfo.getFilePath(), dataOwnCode);
|
||||
|
|
|
|||
Loading…
Reference in New Issue