1.提交缺失的东西
This commit is contained in:
@ -59,6 +59,14 @@ class GoodsCategoryController extends BaseAdminController
|
||||
return $this->fail(GoodsCategoryLogic::getError());
|
||||
}
|
||||
|
||||
// 查询分类
|
||||
public function checkCategory(){
|
||||
$result = GoodsCategoryLogic::getAllTree();
|
||||
if (true === $result) {
|
||||
return $this->success('查询成功', $result);
|
||||
}
|
||||
return $this->fail(GoodsCategoryLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
|
||||
@ -60,7 +60,15 @@ class GoodsCategoryLogic extends BaseLogic
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getAllTree()
|
||||
{
|
||||
$lists = Db::name('goods_category')
|
||||
->field(['name', 'id', 'pid', 'level'])
|
||||
->where(['del' => 0])
|
||||
->order(['sort' => 'desc'])
|
||||
->select()->toArray();
|
||||
return $lists;
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
|
||||
Reference in New Issue
Block a user