package com.yc.education.service.impl;/**
 * huangpan
 * 2019/11/5
 * tongnai
 */

import com.yc.education.mapper.ProductMapper;
import com.yc.education.model.Product;
import com.yc.education.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ProductServiceImpl extends BaseService<Product> implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public List<Product> findProductByPid(Integer cid, Integer wid, String name, String minDate, String maxDate) {
        return productMapper.findProductByPid(cid,wid,name,minDate,maxDate);
    }

    @Override
    public void deleteByCid(Integer cid) {
        productMapper.deleteByCid(cid);
    }

    @Override
    public Product findProductById01(Integer id,Integer cid,Integer wid) {
        return productMapper.findProductById01(id,cid,wid);
    }

    @Override
    public Product findProductById02(Integer id,Integer cid,Integer wid) {
        return productMapper.findProductById02(id,cid,wid);
    }

    @Override
    public void deleteByWid(Integer wid) {
        productMapper.deleteByWid(wid);
    }
}
