增加核销接口
增加hq管理端日志
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Query, UseGuards } from '@nestjs/common';
|
||||
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
||||
import { SuperAdminGuard } from '../../common/guards/super-admin.guard';
|
||||
import { HqOperation } from '../../common/hq-operation/hq-operation.decorator';
|
||||
import { HqOperationAction } from '../../common/hq-operation/hq-operation.constants';
|
||||
import { AdminUsersService } from './admin-users.service';
|
||||
import { AdminUsersQueryDto } from './dto/admin-query.dto';
|
||||
import { BatchDeleteUsersConfirmDto, BatchDeleteUsersDto } from './dto/admin-mutate.dto';
|
||||
@@ -23,6 +25,12 @@ export class AdminUsersController {
|
||||
|
||||
@Post('batch-delete')
|
||||
@UseGuards(SuperAdminGuard)
|
||||
@HqOperation({
|
||||
action: HqOperationAction.USER_BATCH_DELETE,
|
||||
refType: 'USER',
|
||||
batch: true,
|
||||
includeBody: true,
|
||||
})
|
||||
batchDelete(@Body() dto: BatchDeleteUsersConfirmDto) {
|
||||
return this.usersService.batchDeleteUsers(
|
||||
dto.ids.map((id) => BigInt(id)),
|
||||
@@ -37,6 +45,11 @@ export class AdminUsersController {
|
||||
|
||||
@Delete(':id')
|
||||
@UseGuards(SuperAdminGuard)
|
||||
@HqOperation({
|
||||
action: HqOperationAction.USER_DELETE,
|
||||
refType: 'USER',
|
||||
refIdParam: 'id',
|
||||
})
|
||||
remove(@Param('id') id: string) {
|
||||
return this.usersService.deleteUser(BigInt(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user