fix(identity-service): 添加 DTO 验证装饰器
- 为 BatchGetUsersBySequenceDto 添加 class-validator 装饰器 - 修复 ValidationPipe 验证失败问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
1d21ae8ff7
commit
136c831922
|
|
@ -1,5 +1,6 @@
|
|||
import { Controller, Post, Body, Get, Param, Logger } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiProperty } from '@nestjs/swagger';
|
||||
import { IsArray, IsString } from 'class-validator';
|
||||
import { Public } from '@/shared/guards/jwt-auth.guard';
|
||||
import { UserAccountRepositoryImpl } from '@/infrastructure/persistence/repositories/user-account.repository.impl';
|
||||
import { AccountSequence } from '@/domain/value-objects';
|
||||
|
|
@ -8,6 +9,9 @@ import { AccountSequence } from '@/domain/value-objects';
|
|||
* 批量获取用户信息请求 DTO (按 accountSequence)
|
||||
*/
|
||||
class BatchGetUsersBySequenceDto {
|
||||
@ApiProperty({ description: '账户序列号列表', example: ['2412230001', '2412230002'] })
|
||||
@IsArray()
|
||||
@IsString({ each: true })
|
||||
accountSequences: string[];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue