import { Controller , Get , Post , Body , Query , Next , Headers , UseGuards , ParseIntPipe , } from '@nestjs/common' ; import { TagService } from '../service/tag.service' ; @ Controller ( 'tag/visitor' ) export class VisitorController { constructor ( private readonly tagService ) { } @ Get ( '/list' ) async getList ( @ Query ( 'page' , new ParseIntPipe ( ) ) page , @ Query ( 'size' , new ParseIntPipe ( ) ) size , @ Query ( 'user_id' , new ParseIntPipe ( ) ) uerId ) { return this . tagService . getList ( page , size , uerId ) ; } @ Get ( '/info' ) async getTag ( @ Query ( 'user_id' , new ParseIntPipe ( ) ) userId , @ Query ( 'name' ) name ) { return this . tagService . getTag ( userId , name ) ; } }