正在显示
3 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -67,6 +67,7 @@ class BlogLogic extends BaseLogic | @@ -67,6 +67,7 @@ class BlogLogic extends BaseLogic | ||
| 67 | $this->param['project_id'] = $this->user['project_id']; | 67 | $this->param['project_id'] = $this->user['project_id']; |
| 68 | $this->param['created_at'] = date('Y-m-d H:i:s',time()); | 68 | $this->param['created_at'] = date('Y-m-d H:i:s',time()); |
| 69 | $this->param['updated_at'] = date('Y-m-d H:i:s',time()); | 69 | $this->param['updated_at'] = date('Y-m-d H:i:s',time()); |
| 70 | + $this->param['category_id'] = ','.$this->param['category_id'].','; | ||
| 70 | DB::beginTransaction(); | 71 | DB::beginTransaction(); |
| 71 | try { | 72 | try { |
| 72 | if(isset($this->param['image'])){ | 73 | if(isset($this->param['image'])){ |
| @@ -100,6 +101,7 @@ class BlogLogic extends BaseLogic | @@ -100,6 +101,7 @@ class BlogLogic extends BaseLogic | ||
| 100 | $this->fail('当前名称已存在'); | 101 | $this->fail('当前名称已存在'); |
| 101 | } | 102 | } |
| 102 | $this->param['operator_id'] = $this->user['id']; | 103 | $this->param['operator_id'] = $this->user['id']; |
| 104 | + $this->param['category_id'] = ','.trim($this->param['category_id'],',').','; | ||
| 103 | DB::beginTransaction(); | 105 | DB::beginTransaction(); |
| 104 | try { | 106 | try { |
| 105 | //是否有图片更新 | 107 | //是否有图片更新 |
| @@ -59,6 +59,7 @@ class NewsLogic extends BaseLogic | @@ -59,6 +59,7 @@ class NewsLogic extends BaseLogic | ||
| 59 | $this->param['project_id'] = $this->user['project_id']; | 59 | $this->param['project_id'] = $this->user['project_id']; |
| 60 | $this->param['created_at'] = date('Y-m-d H:i:s',time()); | 60 | $this->param['created_at'] = date('Y-m-d H:i:s',time()); |
| 61 | $this->param['updated_at'] = date('Y-m-d H:i:s',time()); | 61 | $this->param['updated_at'] = date('Y-m-d H:i:s',time()); |
| 62 | + $this->param['category_id'] = ','.trim($this->param['category_id'],',').','; | ||
| 62 | DB::beginTransaction(); | 63 | DB::beginTransaction(); |
| 63 | try { | 64 | try { |
| 64 | if(isset($this->param['image'])){ | 65 | if(isset($this->param['image'])){ |
| @@ -91,6 +92,7 @@ class NewsLogic extends BaseLogic | @@ -91,6 +92,7 @@ class NewsLogic extends BaseLogic | ||
| 91 | $this->fail('当前名称已存在'); | 92 | $this->fail('当前名称已存在'); |
| 92 | } | 93 | } |
| 93 | $this->param['operator_id'] = $this->user['id']; | 94 | $this->param['operator_id'] = $this->user['id']; |
| 95 | + $this->param['category_id'] = ','.trim($this->param['category_id'],',').','; | ||
| 94 | DB::beginTransaction(); | 96 | DB::beginTransaction(); |
| 95 | try { | 97 | try { |
| 96 | //上传图片 | 98 | //上传图片 |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | namespace App\Http\Logic\Bside\User; | 3 | namespace App\Http\Logic\Bside\User; |
| 4 | 4 | ||
| 5 | use App\Http\Logic\Bside\BaseLogic; | 5 | use App\Http\Logic\Bside\BaseLogic; |
| 6 | -use App\Models\ProjectGroup; | 6 | +use App\Models\User\ProjectGroup; |
| 7 | 7 | ||
| 8 | class GroupLogic extends BaseLogic | 8 | class GroupLogic extends BaseLogic |
| 9 | { | 9 | { |
| @@ -25,6 +25,7 @@ class GroupLogic extends BaseLogic | @@ -25,6 +25,7 @@ class GroupLogic extends BaseLogic | ||
| 25 | $this->param['admin_id'] = $this->user['admin_id']; | 25 | $this->param['admin_id'] = $this->user['admin_id']; |
| 26 | $this->param['create_id'] = $this->user['create_id']; | 26 | $this->param['create_id'] = $this->user['create_id']; |
| 27 | $this->param['operator_id'] = $this->user['operator_id']; | 27 | $this->param['operator_id'] = $this->user['operator_id']; |
| 28 | + $this->param['user_list'] = ','.trim($this->param['user_list'],',').','; | ||
| 28 | $rs = $this->model->add($this->param); | 29 | $rs = $this->model->add($this->param); |
| 29 | if($rs === false){ | 30 | if($rs === false){ |
| 30 | $this->fail('error'); | 31 | $this->fail('error'); |
| @@ -39,6 +40,7 @@ class GroupLogic extends BaseLogic | @@ -39,6 +40,7 @@ class GroupLogic extends BaseLogic | ||
| 39 | * @method | 40 | * @method |
| 40 | */ | 41 | */ |
| 41 | public function group_edit(){ | 42 | public function group_edit(){ |
| 43 | + $this->param['user_list'] = ','.trim($this->param['user_list'],',').','; | ||
| 42 | $rs = $this->edit($this->param,['id'=>$this->param['id']]); | 44 | $rs = $this->edit($this->param,['id'=>$this->param['id']]); |
| 43 | if($rs === false){ | 45 | if($rs === false){ |
| 44 | $this->fail('error'); | 46 | $this->fail('error'); |
| @@ -54,7 +56,6 @@ class GroupLogic extends BaseLogic | @@ -54,7 +56,6 @@ class GroupLogic extends BaseLogic | ||
| 54 | */ | 56 | */ |
| 55 | public function group_info(){ | 57 | public function group_info(){ |
| 56 | $info = $this->info($this->param); | 58 | $info = $this->info($this->param); |
| 57 | - | ||
| 58 | return $this->success($info); | 59 | return $this->success($info); |
| 59 | } | 60 | } |
| 60 | 61 |
-
请 注册 或 登录 后发表评论