|
|
@ -61,15 +61,13 @@ class FileManager |
|
|
|
foreach ($temFileIdArr as $key => $value) { |
|
|
|
$temFile = TemFile::findOne($value); |
|
|
|
|
|
|
|
if (!$temFile) { |
|
|
|
throw new \Exception('存在查找不到的文件'); |
|
|
|
} |
|
|
|
|
|
|
|
if ($temFile) { |
|
|
|
$res = self::saveNewFile($temFile, $ownId, $ownType); |
|
|
|
if ($key == 0) { |
|
|
|
$firstFileId = $res['file_id']; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$tra->commit(); |
|
|
|
return ['status' => true, 'info' => '保存成功', 'first_file_id' => $firstFileId]; |
|
|
|