Merge branch 'develop'
This commit is contained in:
@@ -5,11 +5,15 @@ namespace app\common\controller;
|
||||
use support\Request;
|
||||
use app\common\service\CorpService;
|
||||
use app\common\service\CorpFeishuAppService;
|
||||
use app\common\service\SystemsService;
|
||||
use app\common\service\UserService;
|
||||
|
||||
class PresetController extends BaseController
|
||||
{
|
||||
|
||||
protected $noNeedLogin = ['corps', 'feishuApp'];
|
||||
protected $noNeedLogin = ['corps', 'feishuApp', 'systems'];
|
||||
|
||||
protected $noNeedHeaderData = ['corps', 'feishuApp', 'systems'];
|
||||
|
||||
public function corps()
|
||||
{
|
||||
@@ -27,10 +31,34 @@ 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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function systems()
|
||||
{
|
||||
try {
|
||||
$result = (new SystemsService())->getList();
|
||||
return $this->success($result, '获取系统列表');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function users()
|
||||
{
|
||||
try {
|
||||
$result = (new UserService())->getList();
|
||||
return $this->success($result, '获取用户列表');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user