作者 lyh

gx

... ... @@ -132,8 +132,8 @@ class ProjectLogic extends BaseLogic
* @time :2023/8/30 11:57
*/
public function projectSave(){
// DB::beginTransaction();
// try {
DB::beginTransaction();
try {
$this->param['project_location'] = 0;//TODO::图片文件存储不同地方,上线后删除
if($this->param['type'] == Project::TYPE_SEVEN){
//错误单直接返回,单独处理
... ... @@ -156,11 +156,11 @@ class ProjectLogic extends BaseLogic
//创建站点
(new SyncService())->projectAcceptAddress($this->param['id']);
}
// DB::commit();
// }catch (\Exception $e){
// DB::rollBack();
// $this->fail('保存失败,请联系管理员');
// }
DB::commit();
}catch (\Exception $e){
DB::rollBack();
$this->fail('保存失败,请联系管理员');
}
return $this->success();
}
... ...