|
@@ -86,6 +86,7 @@ class FileController extends Controller
|
|
->where('title', $file->title)
|
|
->where('title', $file->title)
|
|
->where('object_type', $file->object_type)
|
|
->where('object_type', $file->object_type)
|
|
->where("object_id", $file->object_id)
|
|
->where("object_id", $file->object_id)
|
|
|
|
+ ->where("folder_id", $file->folder_id)
|
|
->get();
|
|
->get();
|
|
|
|
|
|
File::query()->whereIn("id", $files->pluck("id")->toArray())->delete();
|
|
File::query()->whereIn("id", $files->pluck("id")->toArray())->delete();
|
|
@@ -314,7 +315,7 @@ class FileController extends Controller
|
|
$folderId = (int) ($inputArr['folder_id'] ?? 0);
|
|
$folderId = (int) ($inputArr['folder_id'] ?? 0);
|
|
$pageSize = (int) $request->get('page_size', 10);
|
|
$pageSize = (int) $request->get('page_size', 10);
|
|
$modelTypeArr = $inputArr['model_type'] ?? [];
|
|
$modelTypeArr = $inputArr['model_type'] ?? [];
|
|
-
|
|
|
|
|
|
+
|
|
if (empty($modelTypeArr)) {
|
|
if (empty($modelTypeArr)) {
|
|
$modelTypeArr = [BimFileModelType::BIM->value, BimFileModelType::CAD->value];
|
|
$modelTypeArr = [BimFileModelType::BIM->value, BimFileModelType::CAD->value];
|
|
}
|
|
}
|