export class UserDisplayBaseDto {
userId: number;
}
@Get('user')
getUser(@Query() baseDto: UserDisplayBaseDto) {
const userId: number = baseDto.userId;
return this.userDisplayService.getUserInfo(userId);
}
只有一个参数时,可以使用@Param()来获取参数
export class UserDisplayBaseDto {
userId: number;
}
@Get('user')
getUser(@Query() baseDto: UserDisplayBaseDto) {
const userId: number = baseDto.userId;
return this.userDisplayService.getUserInfo(userId);
}
只有一个参数时,可以使用@Param()来获取参数