|
|
@ -18,7 +18,8 @@ type FileService struct {
|
|
|
|
|
|
|
|
|
|
|
|
// FileBatchService 文件批量操作服务
|
|
|
|
// FileBatchService 文件批量操作服务
|
|
|
|
type FileBatchService struct {
|
|
|
|
type FileBatchService struct {
|
|
|
|
ID []uint `json:"id" binding:"min=1"`
|
|
|
|
ID []uint `json:"id" binding:"min=1"`
|
|
|
|
|
|
|
|
Force bool `json:"force"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Delete 删除文件
|
|
|
|
// Delete 删除文件
|
|
|
@ -58,7 +59,7 @@ func (service *FileBatchService) Delete(c *gin.Context) serializer.Response {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 执行删除
|
|
|
|
// 执行删除
|
|
|
|
fs.Delete(context.Background(), []uint{}, ids, false)
|
|
|
|
fs.Delete(context.Background(), []uint{}, ids, service.Force)
|
|
|
|
fs.Recycle()
|
|
|
|
fs.Recycle()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}(userFile)
|
|
|
|
}(userFile)
|
|
|
|