作者 赵彬吉

update

@@ -118,4 +118,8 @@ class ComController extends BaseController @@ -118,4 +118,8 @@ class ComController extends BaseController
118 } 118 }
119 $this->response('success'); 119 $this->response('success');
120 } 120 }
  121 +
  122 + public function uploads(){
  123 +
  124 + }
121 } 125 }
@@ -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 //是否有对应商品