commit
f15c0a3524
@ -55,6 +55,7 @@ import java.net.URLDecoder;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@ -262,7 +263,8 @@ public class FileController {
|
|||||||
List<UserFile> list = userFileService.selectUserFileByLikeRightFilePath(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), true).getPath(), sessionUserBean.getUserId());
|
List<UserFile> list = userFileService.selectUserFileByLikeRightFilePath(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), true).getPath(), sessionUserBean.getUserId());
|
||||||
|
|
||||||
for (UserFile newUserFile : list) {
|
for (UserFile newUserFile : list) {
|
||||||
newUserFile.setFilePath(newUserFile.getFilePath().replaceFirst(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), userFile.getIsDir() == 1).getPath(),
|
String escapedPattern = Pattern.quote(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), userFile.getIsDir() == 1).getPath());
|
||||||
|
newUserFile.setFilePath(newUserFile.getFilePath().replaceFirst(escapedPattern,
|
||||||
new QiwenFile(userFile.getFilePath(), renameFileDto.getFileName(), userFile.getIsDir() == 1).getPath()));
|
new QiwenFile(userFile.getFilePath(), renameFileDto.getFileName(), userFile.getIsDir() == 1).getPath()));
|
||||||
userFileService.updateById(newUserFile);
|
userFileService.updateById(newUserFile);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ public class CommonFile {
|
|||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@Column(columnDefinition="varchar(20)")
|
@Column(columnDefinition="varchar(20)")
|
||||||
public String commonFileId;
|
public String commonFileId;
|
||||||
@Column(columnDefinition="bigint(20) comment '用户文件id'")
|
@Column(columnDefinition="varchar(20) comment '用户文件id'")
|
||||||
public String userFileId;
|
public String userFileId;
|
||||||
// @Column(columnDefinition="int(2) comment '文件权限'")
|
// @Column(columnDefinition="int(2) comment '文件权限'")
|
||||||
// public Integer filePermission;
|
// public Integer filePermission;
|
||||||
|
@ -20,7 +20,7 @@ public class RecoveryFile {
|
|||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@Column(columnDefinition="bigint(20)")
|
@Column(columnDefinition="bigint(20)")
|
||||||
private Long recoveryFileId;
|
private Long recoveryFileId;
|
||||||
@Column(columnDefinition = "bigint(20) comment '用户文件id'")
|
@Column(columnDefinition = "varchar(20) comment '用户文件id'")
|
||||||
private String userFileId;
|
private String userFileId;
|
||||||
@Column(columnDefinition="varchar(25) comment '删除时间'")
|
@Column(columnDefinition="varchar(25) comment '删除时间'")
|
||||||
private String deleteTime;
|
private String deleteTime;
|
||||||
|
@ -11,7 +11,9 @@ import javax.persistence.*;
|
|||||||
* 存储信息类
|
* 存储信息类
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Table(name = "storage")
|
@Table(name = "storage", uniqueConstraints = {
|
||||||
|
@UniqueConstraint(name = "userid_index", columnNames = {"userId"})
|
||||||
|
})
|
||||||
@Entity
|
@Entity
|
||||||
@TableName("storage")
|
@TableName("storage")
|
||||||
public class StorageBean {
|
public class StorageBean {
|
||||||
|
Loading…
Reference in New Issue
Block a user