package com.iamberry.wechat.service.cart.dao.impl;

import java.util.List;

import com.iamberry.wechat.core.entity.product.*;
import com.iamberry.wechat.core.entity.search.SearchInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.PaperBean;
import com.iamberry.wechat.core.entity.cart.ShopOrderItemDto;
import com.iamberry.wechat.service.cart.dao.ProductInfoDao;
import com.iamberry.wechat.service.mapper.ProductInfoMapper;

@Repository
public class ProductInfoDaoImpl implements ProductInfoDao {

	@Autowired
	private ProductInfoMapper productInfoMapper;
	
	@Override
	public List<Product> selectPageProduct(PaperBean bean) {
		// TODO Auto-generated method stub
		return productInfoMapper.selectPageProduct(bean);
	}
	@Override
	public List<ProductFittings> selectPageProductFittings(PaperBean bean) {
		// TODO Auto-generated method stub
		return productInfoMapper.selectPageProductFittings(bean);
	}

	@Override
	public Product getProductByProductId(Integer productId) {
		// TODO Auto-generated method stub
		return productInfoMapper.getProductByProductId(productId);
	}

	@Override
	public List<Product> getProductByProductName(String productName) {
		// TODO Auto-generated method stub
		return productInfoMapper.getProductByProductName(productName);
	}

	@Override
	public List<Product> selectIndexPageProduct() {
		// TODO Auto-generated method stub
		return productInfoMapper.selectIndexPageProduct();
	}

	@Override
	public Integer selectProductCount(Product product) {
		// TODO Auto-generated method stub
		return productInfoMapper.selectProductCount(product);
	}

	@Override
	public Integer updateProductNumList(List<ShopOrderItemDto> orderItemList) {
		// TODO Auto-generated method stub
		return productInfoMapper.updateProductNumList(orderItemList);
	}

	@Override
	public ProductColor getProductColor(ProductColor productColor) {
		return productInfoMapper.getProductColor(productColor);
	}

	@Override
	public ProductFittings getProductFittings(ProductFittings productFittings){
		return productInfoMapper.getProductFittings(productFittings);
	}

	@Override
	public List<ProductType> selectProductType() {
		return productInfoMapper.selectProductType();
	}

	@Override
	public List<Product> selectIndexChoicenessProduct(Integer productChoiceness) {
		return productInfoMapper.selectIndexChoicenessProduct(productChoiceness);
	}

	@Override
	public List<ProductChildType> selectProductFittingsType(Integer typeId) {
		return productInfoMapper.selectProductFittingsType(typeId);
	}

	@Override
	public Integer insertSearchInfo(SearchInfo searchInfo) {
		return productInfoMapper.insertSearchInfo(searchInfo);
	}

	@Override
	public SearchInfo getSearchInfo(SearchInfo searchInfo) {
		return productInfoMapper.getSearchInfo(searchInfo);
	}

	@Override
	public List<SearchInfo> selectSearchInfo(SearchInfo searchInfo) {
		return productInfoMapper.selectSearchInfo(searchInfo);
	}

	@Override
	public Integer updateSearchInfo(SearchInfo searchInfo) {
		return productInfoMapper.updateSearchInfo(searchInfo);
	}

	@Override
	public List<ProductColor> selectColorByPid(Integer productId) {
		return productInfoMapper.selectColorByPid(productId);
	}

	@Override
	public Product selectProductByColorId(Integer colorId) {
		return productInfoMapper.selectProductByColorId(colorId);
	}

}
