|
...
|
...
|
@@ -15,7 +15,6 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
$this->model = new NewsCategoryModel();
|
|
|
|
$this->param = $this->requestAll;
|
|
|
|
}
|
|
...
|
...
|
@@ -117,6 +116,9 @@ class NewsCategoryLogic extends BaseLogic |
|
|
|
$this->fail('当前分类名称已存在');
|
|
|
|
}
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
if($info['id'] == $this->param['pid']){
|
|
|
|
$this->fail('不能成为自己的上级');
|
|
|
|
}
|
|
|
|
if($info['pid'] != $this->param['pid']){
|
|
|
|
//查询当前分类下是否有商品
|
|
|
|
$newsModel = new NewsModel();
|
...
|
...
|
|