调整新增功能部分接口

This commit is contained in:
mzl@hnxinyouhe.com
2025-08-13 18:40:36 +08:00
parent 2696f52db2
commit 5c6fed4e40
10 changed files with 80 additions and 14 deletions
@@ -2,11 +2,13 @@
namespace app\common\controller;
use app\admin\service\RoleService;
use support\Request;
use app\common\service\CorpService;
use app\common\service\CorpFeishuAppService;
use app\common\service\SystemsService;
use app\common\service\UserService;
use support\Cache;
class PresetController extends BaseController
{
@@ -61,4 +63,26 @@ class PresetController extends BaseController
return $this->error($e->getMessage());
}
}
public function roles()
{
try {
$result = (new RoleService)->getList();
return $this->success($result, '获取角色列表');
} catch (\Throwable $e) {
return $this->error($e->getMessage());
}
}
public function cacheClear()
{
try {
Cache::clear();
return $this->success([], '操作成功');
} catch (\Throwable $e) {
return $this->error($e->getMessage());
}
}
}