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

import java.util.List;

import com.iamberry.wechat.core.entity.product.ProductColor;
import com.iamberry.wechat.core.entity.product.QrcodeGift;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.cart.ShopOrderItemDto;
import com.iamberry.wechat.core.entity.cart.UserGiftDto;
import com.iamberry.wechat.core.entity.product.Product;
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(Product product) {
		// TODO Auto-generated method stub
		return productInfoMapper.selectPageProduct(product);
	}

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

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

	@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 UserGiftDto selectUserGift(UserGiftDto userGiftDto) {
		// TODO Auto-generated method stub
		return productInfoMapper.selectUserGift(userGiftDto);
	}

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

    @Override
    public List<QrcodeGift> listQrcodeGift(QrcodeGift qrcodeGift) {
        return productInfoMapper.listQrcodeGift(qrcodeGift);
    }

    @Override
    public Integer listQrcodeGiftCount(QrcodeGift qrcodeGift) {
        return productInfoMapper.listQrcodeGiftCount(qrcodeGift);
    }

    @Override
    public Integer addQrcodeGift(QrcodeGift qrcodeGift) {
        return productInfoMapper.addQrcodeGift(qrcodeGift);
    }

    @Override
    public Integer updateQrcodeGift(QrcodeGift qrcodeGift) {
        return productInfoMapper.updateQrcodeGift(qrcodeGift);
    }

    @Override
    public Integer getQrCodeByPlaceOpenId(String openId) {
        return productInfoMapper.getQrCodeByPlaceOpenId(openId);
    }

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

	@Override
    public Integer updateGiftStatus(QrcodeGift qrcodeGift) {
        return productInfoMapper.updateGiftStatus(qrcodeGift);
    }
}
