获取飞书应用信息增加系统id&&调整菜单显示控制
This commit is contained in:
@@ -31,7 +31,8 @@ class PresetController extends BaseController
|
||||
{
|
||||
try {
|
||||
$corpId = $request->get('corp_id');
|
||||
$result = (new CorpFeishuAppService())->getFeishuApp($corpId);
|
||||
$systemId = $request->get('system_id');
|
||||
$result = (new CorpFeishuAppService())->getFeishuApp($corpId, $systemId);
|
||||
return $this->success($result, '获取飞书应用信息');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
|
||||
@@ -8,9 +8,9 @@ class CorpFeishuAppLogic
|
||||
{
|
||||
|
||||
|
||||
public function getFeishuApp($corpId)
|
||||
public function getFeishuApp($corpId, $systemId)
|
||||
{
|
||||
return CorpFeishuApp::where('corp_id', $corpId)->first(['id', 'corp_id', 'name', 'app_id', 'r_url', 'state']);
|
||||
return CorpFeishuApp::where('corp_id', $corpId)->where('system_id', $systemId)->first(['id', 'corp_id', 'name', 'app_id', 'r_url', 'state']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -257,6 +257,8 @@ class PermLogic
|
||||
'keepAlive' => true,
|
||||
'authList' => $authList,
|
||||
'openType' => $node->open_type,
|
||||
'isHide' => $node->is_hide == 0 ? false : true,
|
||||
'isHideTab' => $node->is_hide_tab == 0 ? false : true
|
||||
],
|
||||
'children' => $children,
|
||||
];
|
||||
|
||||
@@ -14,8 +14,8 @@ class CorpFeishuAppService
|
||||
$this->logic = (new CorpFeishuAppLogic());
|
||||
}
|
||||
|
||||
public function getFeishuApp(int $corpId)
|
||||
public function getFeishuApp(int $corpId, int $systemId)
|
||||
{
|
||||
return $this->logic->getFeishuApp($corpId);
|
||||
return $this->logic->getFeishuApp($corpId, $systemId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user