package com.corewing.app.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.corewing.app.common.page.PageContext;
import com.corewing.app.dto.website.ProductPageRequest;
import com.corewing.app.entity.BizProduct;
import com.corewing.app.mapper.BizProductMapper;
import com.corewing.app.service.BizProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class BizProductServiceImpl extends ServiceImpl<BizProductMapper, BizProduct> implements BizProductService {

    @Resource
    private BizProductMapper bizProductMapper;

    @Override
    public Page<BizProduct> page(ProductPageRequest productPageRequest) {
        Page<BizProduct> page = PageContext.getPage(BizProduct.class);
        return bizProductMapper.page(page, productPageRequest);
    }
}
