正在显示
3 个修改的文件
包含
6 行增加
和
2 行删除
| @@ -41,7 +41,7 @@ class DepartmentLogic extends BaseLogic | @@ -41,7 +41,7 @@ class DepartmentLogic extends BaseLogic | ||
| 41 | continue; | 41 | continue; |
| 42 | } | 42 | } |
| 43 | //是否有子部门 | 43 | //是否有子部门 |
| 44 | - if(Department::where('pid', $id)->count()){ | 44 | + if(Department::where('project_id', $this->user['project_id'])->where('pid', $id)->count()){ |
| 45 | $this->fail("部门{$info['title']}存在下级部门,不能删除"); | 45 | $this->fail("部门{$info['title']}存在下级部门,不能删除"); |
| 46 | } | 46 | } |
| 47 | } | 47 | } |
| @@ -43,7 +43,7 @@ class CategoryLogic extends BaseLogic | @@ -43,7 +43,7 @@ class CategoryLogic extends BaseLogic | ||
| 43 | continue; | 43 | continue; |
| 44 | } | 44 | } |
| 45 | //是否有子分类 | 45 | //是否有子分类 |
| 46 | - if(Category::where('pid', $id)->count()){ | 46 | + if(Category::where('project_id', $this->user['project_id'])->where('pid', $id)->count()){ |
| 47 | $this->fail("分类{$info['title']}存在子分类,不能删除"); | 47 | $this->fail("分类{$info['title']}存在子分类,不能删除"); |
| 48 | } | 48 | } |
| 49 | //是否有对应商品 | 49 | //是否有对应商品 |
-
请 注册 或 登录 后发表评论