|
|
@ -103,15 +103,22 @@ func (service *FileBatchService) Delete(c *gin.Context) serializer.Response {
|
|
|
|
// 异步执行删除
|
|
|
|
// 异步执行删除
|
|
|
|
go func(files map[uint][]model.File) {
|
|
|
|
go func(files map[uint][]model.File) {
|
|
|
|
for uid, file := range files {
|
|
|
|
for uid, file := range files {
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
fs *filesystem.FileSystem
|
|
|
|
|
|
|
|
err error
|
|
|
|
|
|
|
|
)
|
|
|
|
user, err := model.GetUserByID(uid)
|
|
|
|
user, err := model.GetUserByID(uid)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
continue
|
|
|
|
fs, err = filesystem.NewAnonymousFileSystem()
|
|
|
|
}
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
continue
|
|
|
|
fs, err := filesystem.NewFileSystem(&user)
|
|
|
|
}
|
|
|
|
if err != nil {
|
|
|
|
} else {
|
|
|
|
fs.Recycle()
|
|
|
|
fs, err = filesystem.NewFileSystem(&user)
|
|
|
|
continue
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
fs.Recycle()
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 汇总文件ID
|
|
|
|
// 汇总文件ID
|
|
|
|