更新:调整获取商家分类接口返回的数据
parent
19e762187c
commit
edb870b4d6
|
@ -112,7 +112,6 @@ class Dictionary extends Base
|
||||||
*/
|
*/
|
||||||
public function getBusinessTypeList(): Json
|
public function getBusinessTypeList(): Json
|
||||||
{
|
{
|
||||||
$recursionChildren = $this->request->param('recursion/d', 0);
|
|
||||||
$pid = $this->request->param('pid/d', 0);
|
$pid = $this->request->param('pid/d', 0);
|
||||||
|
|
||||||
$whereMap = [];
|
$whereMap = [];
|
||||||
|
@ -124,9 +123,7 @@ class Dictionary extends Base
|
||||||
$items = $repo->getBusinessTypeList($whereMap, [], null, ['pid'=>'asc']);
|
$items = $repo->getBusinessTypeList($whereMap, [], null, ['pid'=>'asc']);
|
||||||
|
|
||||||
$list = $items->toArray();
|
$list = $items->toArray();
|
||||||
if ($recursionChildren > 0) {
|
$list = $repo->recursionChildrenList($list, $pid, 'pid', 'id');
|
||||||
$list = $repo->recursionChildrenList($list, $pid, 'pid', 'id');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->json(0, 'success', $list);
|
return $this->json(0, 'success', $list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue