作者 lyh

gx

... ... @@ -137,8 +137,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){
//错误单直接返回,单独处理
... ... @@ -160,11 +160,11 @@ class ProjectLogic extends BaseLogic
$this->syncImageFile($this->param['project_location'],$this->param['id']);
(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();
}
... ...