Merge branch 'develop' of http://139.196.179.195:3000/chenxudong/electromagnetic-data-new into develop
This commit is contained in:
commit
a148bc463a
|
|
@ -29,7 +29,7 @@ public class FileController {
|
|||
private BackupPro backupPro;
|
||||
|
||||
@RequestMapping("/upload")
|
||||
public ElectromagneticResult<?> upload(@RequestParam("file") MultipartFile file, @RequestParam("path") String path) {
|
||||
public ElectromagneticResult<?> upload(@RequestParam("file") MultipartFile file) {
|
||||
BackupFileResLog backupFileResLog = BackupFileResLog.builder().backupStartTime(new Date()).fileName(file.getOriginalFilename()).backupSuccess(true).build();
|
||||
try {
|
||||
fileService.upload(file);
|
||||
|
|
|
|||
|
|
@ -10,3 +10,6 @@ spring:
|
|||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
|
||||
server:
|
||||
port: 12491
|
||||
|
|
@ -20,7 +20,7 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
|||
this.strictInsertFill(metaObject, "createdAt", Date.class, new Date());
|
||||
}
|
||||
if (metaObject.hasGetter("createdTime")) {
|
||||
this.strictInsertFill(metaObject, "createdTime", Date.class, new Date());
|
||||
this.setFieldValByName("createdTime", new Date(), metaObject);
|
||||
}
|
||||
if (metaObject.hasGetter("gmtModified")) {
|
||||
this.strictInsertFill(metaObject, "gmtModified", Date.class, new Date());
|
||||
|
|
@ -29,7 +29,7 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
|||
this.strictInsertFill(metaObject, "updatedAt", Date.class, new Date());
|
||||
}
|
||||
if (metaObject.hasGetter("createdBy")) {
|
||||
this.strictUpdateFill(metaObject, "createdBy", String.class, Optional.of(UserThreadLocal.getUserId()).orElse(""));
|
||||
this.setFieldValByName("createdBy", Optional.of(UserThreadLocal.getUserId()).orElse(""), metaObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,10 +42,10 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
|||
this.strictUpdateFill(metaObject, "updatedAt", Date.class, new Date());
|
||||
}
|
||||
if (metaObject.hasGetter("updatedTime")) {
|
||||
this.strictUpdateFill(metaObject, "updatedTime", Date.class, new Date());
|
||||
this.setFieldValByName("updatedTime", new Date(), metaObject);
|
||||
}
|
||||
if (metaObject.hasGetter("updatedBy")) {
|
||||
this.strictUpdateFill(metaObject, "updatedTime", String.class, Optional.of(UserThreadLocal.getUserId()).orElse(""));
|
||||
this.setFieldValByName("updatedBy", Optional.of(UserThreadLocal.getUserId()).orElse(""), metaObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,24 +111,23 @@ public class LoginInterceptor implements HandlerInterceptor {
|
|||
|
||||
UserLoginInfo user = Optional.of(UserThreadLocal.getUser()).orElse(new UserLoginInfo());
|
||||
|
||||
UserAccessLog userAccessLog = UserAccessLog.builder()
|
||||
.id(IdWorker.getSnowFlakeIdString())
|
||||
.userId(user.getUserId())
|
||||
.accessStartTime(DateUtil.date(accessStartTime))
|
||||
.accessEndTime(DateUtil.date(accessEndTime))
|
||||
.accessDuration(accessEndTime - accessStartTime)
|
||||
.action(userOperation.value())
|
||||
.requestUrl(request.getRequestURL().toString())
|
||||
.requestIp(parseIpFromUrl(request.getRequestURL().toString()))
|
||||
.reqArgs(reqArgs)
|
||||
.remoteAddr(getRealIp(request))
|
||||
.accessSuccess(true)
|
||||
.createTime(new Date())
|
||||
.operationModule(userOperation.modelName().key)
|
||||
.operationMsg(UserThreadLocal.getUser().getSuccessMsg())
|
||||
.dataId(user.getDataId())
|
||||
.parentId(user.getParentId())
|
||||
.build();
|
||||
UserAccessLog userAccessLog = new UserAccessLog()
|
||||
.setId(IdWorker.getSnowFlakeIdString())
|
||||
.setUserId(user.getUserId())
|
||||
.setAccessStartTime(DateUtil.date(accessStartTime))
|
||||
.setAccessEndTime(DateUtil.date(accessEndTime))
|
||||
.setAccessDuration(accessEndTime - accessStartTime)
|
||||
.setAction(userOperation.value())
|
||||
.setRequestUrl(request.getRequestURL().toString())
|
||||
.setRequestIp(parseIpFromUrl(request.getRequestURL().toString()))
|
||||
.setReqArgs(reqArgs)
|
||||
.setRemoteAddr(getRealIp(request))
|
||||
.setAccessSuccess(true)
|
||||
.setCreateTime(new Date())
|
||||
.setOperationModule(userOperation.modelName().key)
|
||||
.setOperationMsg(UserThreadLocal.getUser().getSuccessMsg())
|
||||
.setDataId(user.getDataId())
|
||||
.setParentId(user.getParentId());
|
||||
|
||||
ElectromagneticResult<?> result = user.getResult();
|
||||
if (result != null) {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class FileFormatController {
|
|||
@Resource
|
||||
private FileFormatService fileFormatService;
|
||||
|
||||
@PostMapping("/add")
|
||||
@GetMapping("/add")
|
||||
@UserOperation(value = "新增文件格式", modelName = UserOperationModuleEnum.DATABASE)
|
||||
public ElectromagneticResult<?> addFileFormat(@RequestParam String suffixName) {
|
||||
return ElectromagneticResultUtil.success(fileFormatService.addFileFormat(suffixName));
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class FileRecycleController {
|
|||
}
|
||||
|
||||
@RequestMapping("remove")
|
||||
@UserOperation(value = "物理删除", modelName = UserOperationModuleEnum.DATABASE)
|
||||
@UserOperation(value = "彻底清除文件", modelName = UserOperationModuleEnum.DATABASE)
|
||||
public ElectromagneticResult<?> remove(@RequestParam String fileId) {
|
||||
return fileRecycleService.remove(fileId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ package com.electromagnetic.industry.software.manage.pojo.models;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@Accessors(chain = true)
|
||||
@TableName("user_access_log")
|
||||
public class UserAccessLog {
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class FileRecycleQueryVO {
|
|||
|
||||
private String fileVersion;
|
||||
|
||||
private Date updateTime;
|
||||
private Date updatedTime;
|
||||
|
||||
private String fileNote;
|
||||
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ public class CommonService {
|
|||
return ElectromagneticResultUtil.fail("-1", info);
|
||||
} else {
|
||||
// 先设置dataStatus状态为删除状态
|
||||
edFileInfoMapper.update(null, Wrappers.<EdFileInfo>lambdaUpdate()
|
||||
edFileInfoMapper.update(new EdFileInfo(), Wrappers.<EdFileInfo>lambdaUpdate()
|
||||
.like(EdFileInfo::getFilePath, id)
|
||||
.set(EdFileInfo::getSort, -1)
|
||||
.set(EdFileInfo::getDataStatus, EleDataStatusEnum.DELETED.code));
|
||||
|
|
@ -306,7 +306,7 @@ public class CommonService {
|
|||
|
||||
for (int i = 0; i < edFileInfos1.size(); i++) {
|
||||
String tmp = edFileInfos1.get(i).getId();
|
||||
edFileInfoMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
edFileInfoMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getSort, i + 1)
|
||||
.eq(EdFileInfo::getId, tmp));
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ public class CommonService {
|
|||
return ElectromagneticResultUtil.fail("-1", info);
|
||||
} else {
|
||||
// 逻辑删除文件夹
|
||||
edFileInfoMapper.update(null, Wrappers.<EdFileInfo>lambdaUpdate()
|
||||
edFileInfoMapper.update(new EdFileInfo(), Wrappers.<EdFileInfo>lambdaUpdate()
|
||||
.eq(EdFileInfo::getId, id)
|
||||
.set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code));
|
||||
fileSystemService.renameFile(srcFilePath, srcPrjName + "_" + IdUtil.fastSimpleUUID() + DELETE_FLAG);
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
UserThreadLocal.setSuccessInfo(fileInfo.getParentId(), id, "作废目录 {} 成功", fileInfo.getFileName());
|
||||
return res;
|
||||
}
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getEffectFlag, false)
|
||||
.set(EdFileInfo::getAllDeleted, true)
|
||||
.eq(EdFileInfo::getFileId, fileInfo.getFileId()));
|
||||
|
|
@ -315,7 +315,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
}
|
||||
|
||||
String srcFilePath = commonService.getFileSysPath(fileInfo.getFilePath(), dataOwnCode);
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, updateFileInfoDTO.getId())
|
||||
.set(EdFileInfo::getFileName, updateFileInfoDTO.getFileName())
|
||||
.set(EdFileInfo::getFileNote, updateFileInfoDTO.getFileNote()));
|
||||
|
|
@ -342,10 +342,10 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
public ElectromagneticResult<?> versionBack(String fileId, int targetVersion) {
|
||||
EdFileInfo fileInfo = this.baseMapper.selectList(Wrappers.<EdFileInfo>lambdaQuery().eq(EdFileInfo::getFileId, fileId).last("limit 1")).get(0);
|
||||
try {
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getFileId, fileId)
|
||||
.set(EdFileInfo::getEffectFlag, false));
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getEffectFlag, true)
|
||||
.eq(EdFileInfo::getFileId, fileId)
|
||||
.eq(EdFileInfo::getFileVersion, targetVersion));
|
||||
|
|
@ -922,7 +922,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
String destFilePath = commonService.getFileSysPath(destSaveFileInfo.getFilePath(), dataOwnCode);
|
||||
fileSystemService.copyFile(srcFilePath, destFilePath);
|
||||
this.baseMapper.deleteById(srcFileInfo.getId());
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code)
|
||||
.eq(EdFileInfo::getId, fileInfoTmp.getId()));
|
||||
return destSaveFileInfo;
|
||||
|
|
@ -1085,7 +1085,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
.setPreVersion(maxFileVersion)
|
||||
.setEffectFlag(EffectFlagEnum.EFFECT.code)
|
||||
.setFileCode(fileCode);
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class).eq(EdFileInfo::getParentId, targetFolderId)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class).eq(EdFileInfo::getParentId, targetFolderId)
|
||||
.eq(EdFileInfo::getFileName, srcFileInfo.getFileName())
|
||||
.eq(EdFileInfo::getFileType, srcFileInfo.getFileType()).set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code));
|
||||
this.baseMapper.insert(destSaveFileInfo);
|
||||
|
|
@ -1138,7 +1138,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
String timeStr = EleCommonUtil.getNowTimeStr();
|
||||
String fileCode = commonService.createFileCode(codePathByDbPath, suffix, FILE_START_VERSION, timeStr);
|
||||
// 将原有效的版本置为false
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code)
|
||||
.eq(EdFileInfo::getId, effectFileInfo.getId()));
|
||||
// 新增文件
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
String tmpPath = newPrjName + "_" + IdUtil.fastSimpleUUID() + DELETE_FLAG;
|
||||
fileSystemService.renameFile(newPath, tmpPath);
|
||||
}
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, prjId)
|
||||
.set(EdFileInfo::getFileName, newPrjName));
|
||||
fileSystemService.renameFile(commonService.getEleDataPath(dataOwnCode), oldPrjName, newPrjName);
|
||||
|
|
@ -184,7 +184,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
List<EdFileInfo> edFileInfos = this.baseMapper.selectList(queryWrapper);
|
||||
List<String> ids = edFileInfos.stream().map(EdFileInfo::getId).collect(Collectors.toList());
|
||||
ids.add(prjId);
|
||||
this.baseMapper.update(null, 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);
|
||||
fileSystemService.renameFile(commonService.getFileSysPath(prjId, dataOwnCode), prjFile + "_" + IdUtil.fastSimpleUUID() + DELETE_FLAG);
|
||||
|
|
@ -257,7 +257,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
LambdaUpdateWrapper<EdFileInfo> updateWrapper = Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.set(EdFileInfo::getSort, folderResortDTO.getSort())
|
||||
.eq(EdFileInfo::getId, folderResortDTO.getId());
|
||||
this.update(updateWrapper);
|
||||
this.update(new EdFileInfo(), updateWrapper);
|
||||
}
|
||||
UserThreadLocal.setSuccessInfo("", "", "子集重排序成功");
|
||||
return ElectromagneticResultUtil.success(true);
|
||||
|
|
@ -291,7 +291,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
fileSysPaths.add(fileSysPath);
|
||||
});
|
||||
|
||||
this.update(Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getDataStatus, EleDataStatusEnum.DELETED.code)
|
||||
.set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code)
|
||||
.likeRight(EdFileInfo::getFilePath, prjId));
|
||||
|
|
@ -300,7 +300,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
.set(EdFileInfo::getDataStatus, EleDataStatusEnum.PUBLISHED.code)
|
||||
.eq(EdFileInfo::getDataStatus, EleDataStatusEnum.NOT_PUBLISHED.code)
|
||||
.likeRight(EdFileInfo::getFilePath, prjId);
|
||||
this.update(updateWrapper);
|
||||
this.update(new EdFileInfo(), updateWrapper);
|
||||
commonService.deletePrjSysDir(fileSysPaths);
|
||||
UserThreadLocal.setSuccessInfo("", prjId, "项目 {} 发布成功", fileInfo.getFileName());
|
||||
return ElectromagneticResultUtil.success(true);
|
||||
|
|
@ -433,7 +433,7 @@ public class EdPrjServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileInfo>
|
|||
EdFileInfo fileInfo = this.baseMapper.selectOne(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, id));
|
||||
String sysFilePath = commonService.getFileSysPath(fileInfo.getFilePath(), dataOwnCode);
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.baseMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getId, id)
|
||||
.set(EdFileInfo::getFileName, newFolderName));
|
||||
fileSystemService.renameFile(sysFilePath, newFolderName);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.electromagnetic.industry.software.manage.pojo.models.FileFormat;
|
|||
import com.electromagnetic.industry.software.manage.pojo.resp.FileFormatVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
|
||||
// 有可能是被废除了,现在恢复
|
||||
if (names.contains(suffixName)) {
|
||||
this.baseMapper.update(null, Wrappers.<FileFormat>lambdaUpdate().set(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code));
|
||||
this.baseMapper.update(new FileFormat(), Wrappers.<FileFormat>lambdaUpdate().set(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code).eq(FileFormat::getSuffixName, suffixName));
|
||||
} else {
|
||||
FileFormat fileFormat = new FileFormat();
|
||||
fileFormat.setSuffixName(suffixName);
|
||||
|
|
@ -62,7 +63,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
*/
|
||||
@Override
|
||||
public boolean deleteFileFormat(String id) {
|
||||
this.baseMapper.update(null, Wrappers.<FileFormat>lambdaUpdate().eq(FileFormat::getId, id).set(FileFormat::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code));
|
||||
this.baseMapper.update(new FileFormat(), Wrappers.<FileFormat>lambdaUpdate().eq(FileFormat::getId, id).set(FileFormat::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code));
|
||||
UserThreadLocal.setSuccessInfo("","", StrFormatter.format("废除了文件格式,id {} ", id));
|
||||
return true;
|
||||
}
|
||||
|
|
@ -73,7 +74,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
*/
|
||||
@Override
|
||||
public List<FileFormatVO> getList() {
|
||||
List<FileFormat> fileFormats = this.baseMapper.selectList(Wrappers.<FileFormat>lambdaQuery().eq(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code));
|
||||
List<FileFormat> fileFormats = this.baseMapper.selectList(Wrappers.<FileFormat>lambdaQuery().eq(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code).orderByDesc(FileFormat::getCreatedTime));
|
||||
List<FileFormatVO> fileFormatVOS = BeanUtil.copyToList(fileFormats, FileFormatVO.class);
|
||||
UserThreadLocal.setSuccessInfo("","", "查询了文件格式列表");
|
||||
return fileFormatVOS;
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public class FileRecycleServiceImpl implements FileRecycleService {
|
|||
}
|
||||
|
||||
// 更新MySQL数据库
|
||||
this.edFileInfoMapper.update(null, Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
this.edFileInfoMapper.update(new EdFileInfo(), Wrappers.lambdaUpdate(EdFileInfo.class)
|
||||
.eq(EdFileInfo::getFileId, fileId)
|
||||
.set(EdFileInfo::getEffectFlag, EffectFlagEnum.NOT_EFFECTIVE.code)
|
||||
.set(EdFileInfo::getPermanentDeleted, true)
|
||||
|
|
|
|||
|
|
@ -32,10 +32,6 @@ public class UserAccessLogServiceImpl extends ServiceImpl<UserAccessLogMapper, U
|
|||
@Resource
|
||||
private UserMapper userMapper;
|
||||
|
||||
@Resource
|
||||
private PermissionService permissionService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询操作记录(审计)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -135,25 +135,24 @@ public class BackupTask {
|
|||
List<File> files = FileUtil.loopFiles(elePropertyConfig.getTmpDir(), filter);
|
||||
for (File file : files) {
|
||||
fileSystemService.deleteFile(file.getAbsolutePath());
|
||||
UserAccessLog userAccessLog = UserAccessLog.builder()
|
||||
.id(IdWorker.getSnowFlakeIdString())
|
||||
.userId("")
|
||||
.accessStartTime(new Date())
|
||||
.accessEndTime(new Date())
|
||||
.accessDuration(0L)
|
||||
.action("删除")
|
||||
.requestUrl("")
|
||||
.requestIp("")
|
||||
.reqArgs("")
|
||||
.remoteAddr("")
|
||||
.accessSuccess(true)
|
||||
.operationMsg("从系统中物理删除了文件" + file.getName())
|
||||
.createTime(new Date())
|
||||
.operationModule(UserOperationModuleEnum.TMP.key)
|
||||
.dataId("")
|
||||
.parentId("")
|
||||
.response("")
|
||||
.build();
|
||||
UserAccessLog userAccessLog = new UserAccessLog()
|
||||
.setId(IdWorker.getSnowFlakeIdString())
|
||||
.setUserId("")
|
||||
.setAccessStartTime(new Date())
|
||||
.setAccessEndTime(new Date())
|
||||
.setAccessDuration(0L)
|
||||
.setAction("删除")
|
||||
.setRequestUrl("")
|
||||
.setRequestIp("")
|
||||
.setReqArgs("")
|
||||
.setRemoteAddr("")
|
||||
.setAccessSuccess(true)
|
||||
.setOperationMsg("从系统中物理删除了文件" + file.getName())
|
||||
.setCreateTime(new Date())
|
||||
.setOperationModule(UserOperationModuleEnum.TMP.key)
|
||||
.setDataId("")
|
||||
.setParentId("")
|
||||
.setResponse("");
|
||||
userAccessLogMapper.insert(userAccessLog);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue