package com.itbaizhan.trave.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itbaizhan.trave.mapper.ProductMapper;
import com.itbaizhan.trave.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductService {
    @Autowired
    private ProductMapper productMapper;

    public Page<Product> findPage(Integer page,Integer size){
        Page productPage = productMapper.findProductPage(new Page(page, size));
        return productPage;
    }

    public void add(Product product){
        productMapper.insert(product);
    }

}
