This commit is contained in:
jinsir 2025-02-23 20:36:49 +08:00
parent f3652b8170
commit f625139d2c
2 changed files with 4 additions and 31 deletions

View File

@ -16,30 +16,13 @@ export class GoodsController {
}
// 示例2路径参数
@Get('detail/:id')
getDetail(@Param('id') id: string) {
return {
id: id,
detail: `Detail for product ${id}`
};
}
// 示例3多个查询参数
@Get('search')
searchProducts(
@Query('keyword') keyword: string,
@Query('page') page: number = 1,
@Query('limit') limit: number = 10
) {
return {
@Get('detail/:id')<<<<<<< HEAD
keyword,
page,
limit,
results: []
};
}
<<<<<<< HEAD
}
=======
}
>>>>>>> de6e632ec69dd408a6c4e85d5cda01a1aa8e8276

View File

@ -3,18 +3,8 @@ import { GoodsService } from './goods.service';
import { GoodsController } from './goods.controller';
@Module({
<<<<<<< HEAD
providers: [GoodsService],
controllers:[GoodsController]
})
export class GoodsModule {}
=======
providers: [GoodsService],
controllers: [GoodsController],
})
export class GoodsModule {}
>>>>>>> de6e632ec69dd408a6c4e85d5cda01a1aa8e8276