正在显示
1 个修改的文件
包含
13 行增加
和
9 行删除
| @@ -93,8 +93,8 @@ class ProjectLogic extends BaseLogic | @@ -93,8 +93,8 @@ class ProjectLogic extends BaseLogic | ||
| 93 | * @time :2023/8/30 11:57 | 93 | * @time :2023/8/30 11:57 |
| 94 | */ | 94 | */ |
| 95 | public function projectSave(){ | 95 | public function projectSave(){ |
| 96 | -// DB::beginTransaction(); | ||
| 97 | -// try { | 96 | + DB::beginTransaction(); |
| 97 | + try { | ||
| 98 | if($this->param['type'] == Project::TYPE_SEVEN){ | 98 | if($this->param['type'] == Project::TYPE_SEVEN){ |
| 99 | //错误单直接返回,单独处理 | 99 | //错误单直接返回,单独处理 |
| 100 | $this->setTypeSevenEdit($this->param); | 100 | $this->setTypeSevenEdit($this->param); |
| @@ -114,11 +114,11 @@ class ProjectLogic extends BaseLogic | @@ -114,11 +114,11 @@ class ProjectLogic extends BaseLogic | ||
| 114 | //创建站点 | 114 | //创建站点 |
| 115 | $this->createSite($this->param); | 115 | $this->createSite($this->param); |
| 116 | } | 116 | } |
| 117 | -// DB::commit(); | ||
| 118 | -// }catch (\Exception $e){ | ||
| 119 | -// DB::rollBack(); | ||
| 120 | -// $this->fail('请填写完整后再提交'); | ||
| 121 | -// } | 117 | + DB::commit(); |
| 118 | + }catch (\Exception $e){ | ||
| 119 | + DB::rollBack(); | ||
| 120 | + $this->fail('请填写完整后再提交'); | ||
| 121 | + } | ||
| 122 | return $this->success(); | 122 | return $this->success(); |
| 123 | } | 123 | } |
| 124 | 124 | ||
| @@ -142,13 +142,17 @@ class ProjectLogic extends BaseLogic | @@ -142,13 +142,17 @@ class ProjectLogic extends BaseLogic | ||
| 142 | } | 142 | } |
| 143 | if(isset($param['notice_file']) && !empty($param['notice_file'])){ | 143 | if(isset($param['notice_file']) && !empty($param['notice_file'])){ |
| 144 | foreach ($param['notice_file'] as &$v1) { | 144 | foreach ($param['notice_file'] as &$v1) { |
| 145 | - $v1['url'] = str_replace_url($v1['url']); | 145 | + if(isset($v1['url']) && !empty($v1['url'])){ |
| 146 | + $v1['url'] = str_replace_url($v1['url']); | ||
| 147 | + } | ||
| 146 | } | 148 | } |
| 147 | $param['notice_file'] = Arr::a2s($param['notice_file']); | 149 | $param['notice_file'] = Arr::a2s($param['notice_file']); |
| 148 | } | 150 | } |
| 149 | if(isset($param['confirm_file']) && !empty($param['confirm_file'])){ | 151 | if(isset($param['confirm_file']) && !empty($param['confirm_file'])){ |
| 150 | foreach ($param['confirm_file'] as &$v2) { | 152 | foreach ($param['confirm_file'] as &$v2) { |
| 151 | - $v2['url'] = str_replace_url($v2['url']); | 153 | + if(isset($v2['url']) && !empty($v2['url'])){ |
| 154 | + $v2['url'] = str_replace_url($v2['url']); | ||
| 155 | + } | ||
| 152 | } | 156 | } |
| 153 | $param['confirm_file'] = Arr::a2s($param['confirm_file']); | 157 | $param['confirm_file'] = Arr::a2s($param['confirm_file']); |
| 154 | } | 158 | } |
-
请 注册 或 登录 后发表评论