正在显示
2 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -528,11 +528,10 @@ class BTemplateLogic extends BaseLogic | @@ -528,11 +528,10 @@ class BTemplateLogic extends BaseLogic | ||
| 528 | $is_custom = $is_list = 0; | 528 | $is_custom = $is_list = 0; |
| 529 | } | 529 | } |
| 530 | //查看当前数据是否还存在 | 530 | //查看当前数据是否还存在 |
| 531 | - $condition = ['template_id'=>$template_id,'is_list'=>$is_list,'is_custom'=>$is_custom,'source'=>$typeSource,'common_type'=>$type]; | 531 | + $condition = ['project_id'=>$this->user['project_id'],'template_id'=>$template_id,'is_list'=>$is_list,'is_custom'=>$is_custom,'source'=>$typeSource,'common_type'=>$type]; |
| 532 | $info = $templateComModel->read($condition); | 532 | $info = $templateComModel->read($condition); |
| 533 | if($info === false){ | 533 | if($info === false){ |
| 534 | $data = array_merge($param,$condition); | 534 | $data = array_merge($param,$condition); |
| 535 | - $data['project_id'] = $this->user['project_id']; | ||
| 536 | $templateComModel->add($data); | 535 | $templateComModel->add($data); |
| 537 | }else{ | 536 | }else{ |
| 538 | $templateComModel->edit($param,$condition); | 537 | $templateComModel->edit($param,$condition); |
| @@ -217,11 +217,10 @@ class InitHtmlLogic extends BaseLogic | @@ -217,11 +217,10 @@ class InitHtmlLogic extends BaseLogic | ||
| 217 | $is_custom = $is_list = 0; | 217 | $is_custom = $is_list = 0; |
| 218 | } | 218 | } |
| 219 | //查看当前数据是否还存在 | 219 | //查看当前数据是否还存在 |
| 220 | - $condition = ['template_id'=>$template_id,'is_list'=>$is_list,'is_custom'=>$is_custom,'source'=>$typeSource,'common_type'=>$type]; | 220 | + $condition = ['project_id'=>$this->user['project_id'],'template_id'=>$template_id,'is_list'=>$is_list,'is_custom'=>$is_custom,'source'=>$typeSource,'common_type'=>$type]; |
| 221 | $info = $templateComModel->read($condition); | 221 | $info = $templateComModel->read($condition); |
| 222 | if($info === false){ | 222 | if($info === false){ |
| 223 | $data = array_merge($param,$condition); | 223 | $data = array_merge($param,$condition); |
| 224 | - $data['project_id'] = $this->user['project_id']; | ||
| 225 | $templateComModel->add($data); | 224 | $templateComModel->add($data); |
| 226 | }else{ | 225 | }else{ |
| 227 | $templateComModel->edit($param,$condition); | 226 | $templateComModel->edit($param,$condition); |
-
请 注册 或 登录 后发表评论