|
|
@ -22,7 +22,7 @@ class ResourceService extends Service |
|
|
//插入资源表
|
|
|
//插入资源表
|
|
|
$resource = Resource::create($param); |
|
|
$resource = Resource::create($param); |
|
|
|
|
|
|
|
|
//存在授权文件 插入授权文件表
|
|
|
|
|
|
|
|
|
//存在授权文件 插入素材表
|
|
|
if ($param['copyright_type'] == 2 && isset($param['accredit_files'])) { |
|
|
if ($param['copyright_type'] == 2 && isset($param['accredit_files'])) { |
|
|
(new FileService())->addAccreditFile($resource, $param['accredit_files']); |
|
|
(new FileService())->addAccreditFile($resource, $param['accredit_files']); |
|
|
} |
|
|
} |
|
|
@ -49,6 +49,9 @@ class ResourceService extends Service |
|
|
$resource->file_size = $file_size_and_count['file_size']; |
|
|
$resource->file_size = $file_size_and_count['file_size']; |
|
|
$resource->file_count = $file_size_and_count['file_count']; |
|
|
$resource->file_count = $file_size_and_count['file_count']; |
|
|
//todo 还有状态的啥的
|
|
|
//todo 还有状态的啥的
|
|
|
|
|
|
$process_service = new ProcessService(); |
|
|
|
|
|
$resource->audit_status = $process_service->getResouceUploadStatus($resource, true); |
|
|
|
|
|
|
|
|
$resource->save(); |
|
|
$resource->save(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|