webadmin增加显示子账号显示列表

修复api服务端报错
This commit is contained in:
2026-07-10 10:36:01 +08:00
parent b1d5b3214f
commit 2368121972
6 changed files with 401 additions and 45 deletions
@@ -1,4 +1,4 @@
import { Body, Controller, Get, Param, Post, Put, Query, UseGuards } from '@nestjs/common';
import { Body, Controller, Delete, Get, Param, Post, Put, Query, UseGuards } from '@nestjs/common';
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
import { HqOperation } from '../../common/hq-operation/hq-operation.decorator';
import { HqOperationAction } from '../../common/hq-operation/hq-operation.constants';
@@ -54,6 +54,11 @@ export class AdminPartnersController {
export class AdminPartnerAccountsController {
constructor(private readonly service: AdminPartnersService) {}
@Get('tree')
tree(@Query('partnerId') partnerId?: string) {
return this.service.listPartnerAccountTree(partnerId ? BigInt(partnerId) : undefined);
}
@Get()
list(@Query() query: AdminPartnerAccountsQueryDto) {
return this.service.listPartnerAccounts(query);
@@ -85,4 +90,14 @@ export class AdminPartnerAccountsController {
update(@Param('id') id: string, @Body() dto: UpdatePartnerAccountDto) {
return this.service.updatePartnerAccount(BigInt(id), dto);
}
@Delete(':id')
@HqOperation({
action: HqOperationAction.PARTNER_ACCOUNT_DELETE,
refType: 'PARTNER_ACCOUNT',
refIdParam: 'id',
})
remove(@Param('id') id: string) {
return this.service.deletePartnerSubAccount(BigInt(id));
}
}