//controller
@RequestMapping("/productList/{currentPage}/{pageSize}{typeId}")
public ResultJson productList(@PathVariable Integer typeId,@PathVariable Integer currentPage,@PathVariable Integer pageSize){
IPage<Product> productIPage = productService.productList(typeId, new Page<>(currentPage, pageSize));
return ResultJson.ok(productIPage);
}
//service
IPage<Product> productList(@Param("typeId") Integer typeId, IPage<Product> page);
public IPage<Product> productList(Integer typeId, IPage<Product> page) {
return this.baseMapper.productList(typeId,page);
}
//mapper
IPage<Product> productList(@Param("typeId") Integer typeId, IPage<Product> page);