perf: [comm] 支持插件管理

This commit is contained in:
xiaojunnuo
2024-10-14 00:19:55 +08:00
parent 417971d15d
commit e8b617b80c
24 changed files with 270 additions and 179 deletions
@@ -7,13 +7,21 @@ export abstract class CrudController<T> extends BaseController {
@Post('/page')
async page(@Body(ALL) body: any) {
const pageRet = await this.getService().page(body?.query, body?.page, body?.sort, null);
const pageRet = await this.getService().page({
query: body.query ?? {},
page: body.page,
sort: body.sort,
bq: body.bq,
});
return this.ok(pageRet);
}
@Post('/list')
async list(@Body(ALL) body: any) {
const listRet = await this.getService().list(body, null, null);
const listRet = await this.getService().list({
query: body.query ?? {},
order: body.order,
});
return this.ok(listRet);
}