package com.yc.education.service.impl;/**
 * huangpan
 * 2019/10/22
 * energy
 */

import com.github.pagehelper.PageHelper;
import com.yc.education.mapper.ProductclassifyMapper;
import com.yc.education.model.Productclassify;
import com.yc.education.service.ProductOneService;
import com.yc.education.service.ProductclassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 *@ClassName ProductOneServiceImpl
 *@Description TODO
 *@Author QuZhangJing
 *@Date 2019/10/22 14:47
 *@Version 1.0
 */
@Service
public class ProductOneServiceImpl  extends BaseService<Productclassify> implements ProductOneService {
    @Autowired
    ProductclassifyMapper productclassifyMapper;

    @Override
    public List<Productclassify> selAllPclassify(Integer id, String pName, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return productclassifyMapper.selAllPclassify(id, pName );
    }

    @Override
    public Productclassify selectPclassifyById(Integer id) {
        return productclassifyMapper.selectPclassifyById(id);
    }

    @Override
    public int countPclassify(Integer id) {
        return productclassifyMapper.countPclassify(id);
    }

    @Override
    public void deletePclassifyById(Integer id) {
        productclassifyMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<Productclassify> getProductclassify() {
        return productclassifyMapper.getProductclassify();
    }

    @Override
    public int getPclassifyById() {
        return productclassifyMapper.getPclassifyById();
    }

    @Override
    public List<Productclassify> getProductById(Integer id) {
        return productclassifyMapper.getProductById(id);
    }

    @Override
    public List<Productclassify> getProduct() {
        return productclassifyMapper.getProduct();
    }

    @Override
    public List<Productclassify> getcast(Integer id, String pName, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return productclassifyMapper.getcast(id, pName);
    }

    @Override
    public List<Productclassify> gerreemod() {
        return productclassifyMapper.gerreemod();
    }
}
