作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

... ... @@ -129,8 +129,8 @@ class ProjectLogic extends BaseLogic
* @time :2023/8/30 11:57
*/
public function projectSave(){
DB::beginTransaction();
try {
// DB::beginTransaction();
// try {
if($this->param['type'] == Project::TYPE_SEVEN){
//错误单直接返回,单独处理
$this->setTypeSevenEdit($this->param);
... ... @@ -154,11 +154,11 @@ class ProjectLogic extends BaseLogic
//创建站点
// $this->createSite($this->param);
}
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('保存失败,请联系管理员');
}
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('保存失败,请联系管理员');
// }
(new SyncService())->projectAcceptAddress($this->param['id']);
return $this->success();
}
... ...
... ... @@ -69,7 +69,7 @@ class AmazonS3Service
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($files, true) . PHP_EOL, FILE_APPEND);
$key = str_replace_url($files);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($key, true) . PHP_EOL, FILE_APPEND);
try {
// try {
$result = $this->s3->putObject([
'Bucket' => $this->bucket,
'Key' => $key,
... ... @@ -77,9 +77,9 @@ class AmazonS3Service
]);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
return $result['ObjectURL'];
} catch (AwsException $e) {
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND);
return '上传文件到S3时发生错误:' . $e->getMessage();
}
// } catch (AwsException $e) {
// @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$e->getMessage(), true) . PHP_EOL, FILE_APPEND);
// return '上传文件到S3时发生错误:' . $e->getMessage();
// }
}
}
... ...