|
@@ -140,7 +140,7 @@ class Newfill extends BaseController
|
|
|
if($pid===""){
|
|
|
return error_show(1002,"父级id不能为空");
|
|
|
}
|
|
|
- $spid = Db::name('company_item')->where(['pid'=>0,'is_del'=>0])->find();
|
|
|
+ $spid = Db::name('company_item')->where(['id'=>$pid,'is_del'=>0])->find();
|
|
|
$level = isset($this->post['level']) && $this->post['level'] !==""? trim($this->post['level']):"1";
|
|
|
$weight = isset($this->post['weight']) && $this->post['weight'] !==""? trim($this->post['weight']):"1";
|
|
|
Db::startTrans();
|
|
@@ -192,7 +192,7 @@ class Newfill extends BaseController
|
|
|
if($pid==""){
|
|
|
return error_show(1002,"父级id不能为空");
|
|
|
}
|
|
|
- $spid = Db::name('company_item')->where(['pid'=>0,'is_del'=>0])->find();
|
|
|
+ $spid = Db::name('company_item')->where(['id'=>$pid,'is_del'=>0])->find();
|
|
|
if(empty($spid)){
|
|
|
return error_show(1004,"父级id不能为空");
|
|
|
}
|