正在显示
3 个修改的文件
包含
11 行增加
和
11 行删除
| @@ -74,9 +74,9 @@ class OptimizeController extends BaseController | @@ -74,9 +74,9 @@ class OptimizeController extends BaseController | ||
| 74 | $item['product_num'] = $data['product'] ?? 0; | 74 | $item['product_num'] = $data['product'] ?? 0; |
| 75 | $item['keyword_num'] = $item['key'] ?? 0; | 75 | $item['keyword_num'] = $item['key'] ?? 0; |
| 76 | $item['autologin_code'] = getAutoLoginCode($item['id']); | 76 | $item['autologin_code'] = getAutoLoginCode($item['id']); |
| 77 | - $item['article_num'] = ($data['blog'] ?? 0) + ($data['news'] ?? 0); | ||
| 78 | - $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN); | ||
| 79 | - $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]); | 77 | +// $item['article_num'] = ($data['blog'] ?? 0) + ($data['news'] ?? 0); |
| 78 | +// $item['task_finish_num'] = Task::getNumByProjectId($item['id'], Task::STATUS_DOWN); | ||
| 79 | +// $item['task_pending_num'] = Task::getNumByProjectId($item['id'], [Task::STATUS_DONGING, Task::STATUS_WAIT]); | ||
| 80 | return $item; | 80 | return $item; |
| 81 | } | 81 | } |
| 82 | /** | 82 | /** |
| @@ -23,7 +23,7 @@ class UserController extends BaseController | @@ -23,7 +23,7 @@ class UserController extends BaseController | ||
| 23 | public function lists(UserModel $userModel){ | 23 | public function lists(UserModel $userModel){ |
| 24 | //TODO::搜索参数统一处理 | 24 | //TODO::搜索参数统一处理 |
| 25 | $this->map['project_id'] = $this->user['project_id']; | 25 | $this->map['project_id'] = $this->user['project_id']; |
| 26 | - $this->map['role'] = ['!=',0]; | 26 | + $this->map['role_id'] = ['!=',0]; |
| 27 | $lists = $userModel->lists($this->map,$this->page,$this->row,$this->order,['id','name','mobile','created_at','wechat','status']); | 27 | $lists = $userModel->lists($this->map,$this->page,$this->row,$this->order,['id','name','mobile','created_at','wechat','status']); |
| 28 | $this->response('success',Code::SUCCESS,$lists); | 28 | $this->response('success',Code::SUCCESS,$lists); |
| 29 | } | 29 | } |
| @@ -91,8 +91,8 @@ class ProjectLogic extends BaseLogic | @@ -91,8 +91,8 @@ class ProjectLogic extends BaseLogic | ||
| 91 | * @time :2023/8/30 11:57 | 91 | * @time :2023/8/30 11:57 |
| 92 | */ | 92 | */ |
| 93 | public function projectSave(){ | 93 | public function projectSave(){ |
| 94 | -// DB::beginTransaction(); | ||
| 95 | -// try { | 94 | + DB::beginTransaction(); |
| 95 | + try { | ||
| 96 | if($this->param['type'] == Project::TYPE_SEVEN){ | 96 | if($this->param['type'] == Project::TYPE_SEVEN){ |
| 97 | //错误单直接返回,单独处理 | 97 | //错误单直接返回,单独处理 |
| 98 | $this->setTypeSevenEdit($this->param); | 98 | $this->setTypeSevenEdit($this->param); |
| @@ -110,11 +110,11 @@ class ProjectLogic extends BaseLogic | @@ -110,11 +110,11 @@ class ProjectLogic extends BaseLogic | ||
| 110 | //保存售后信息 | 110 | //保存售后信息 |
| 111 | $this->saveProjectAfter($this->param['project_after']); | 111 | $this->saveProjectAfter($this->param['project_after']); |
| 112 | } | 112 | } |
| 113 | -// DB::commit(); | ||
| 114 | -// }catch (\Exception $e){ | ||
| 115 | -// DB::rollBack(); | ||
| 116 | -// $this->fail('error'); | ||
| 117 | -// } | 113 | + DB::commit(); |
| 114 | + }catch (\Exception $e){ | ||
| 115 | + DB::rollBack(); | ||
| 116 | + $this->fail('error'); | ||
| 117 | + } | ||
| 118 | return $this->success(); | 118 | return $this->success(); |
| 119 | } | 119 | } |
| 120 | 120 |
-
请 注册 或 登录 后发表评论