Merge branch 'feature/mzl_dev' into develop
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\controller;
|
||||
|
||||
use support\Request;
|
||||
use app\common\service\CorpService;
|
||||
use app\common\service\CorpFeishuAppService;
|
||||
|
||||
class PresetController extends BaseController
|
||||
{
|
||||
|
||||
protected $noNeedLogin = ['corps', 'feishuApp'];
|
||||
|
||||
public function corps()
|
||||
{
|
||||
try {
|
||||
$result = (new CorpService())->getList();
|
||||
return $this->success($result, '获取公司列表');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function feishuApp(Request $request)
|
||||
{
|
||||
try {
|
||||
$corpId = $request->get('corp_id');
|
||||
$result = (new CorpFeishuAppService())->getFeishuApp($corpId);
|
||||
return $this->success($result, '获取飞书应用信息');
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user