package com.hzs.sale.product.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzs.common.domain.sale.product.BdProductSpecs;
import com.hzs.sale.product.mapper.BdProductSpecsMapper;
import com.hzs.sale.product.service.IBdProductSpecsService;
import com.hzs.sale.product.vo.BdProductSpecsInfo;
import com.hzs.sale.product.vo.ProductSpecsVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 规格明细表 服务实现类
 * </p>
 *
 * @author hzs
 * @since 2022-09-13
 */
@Service
public class BdProductSpecsServiceImpl extends ServiceImpl<BdProductSpecsMapper, BdProductSpecs> implements IBdProductSpecsService {
    /**
     * 产品规格
     * @param pkProduct
     * @return
     */
    @Override
    public List<ProductSpecsVo> selectByList(Integer pkProduct) {
        return baseMapper.selectByList(pkProduct);
    }

    /**
     * 根据分类查询所有规格明细
     * @param pkSpecsType
     * @return
     */
    @Override
    public List<BdProductSpecsInfo> findByPkSpecsType(Integer pkSpecsType) {
        return baseMapper.findByPkSpecsType(pkSpecsType);
    }


    /**
     * 查询所有产品规格明细
     * @param pkProduct
     * @param pkCountry
     * @return
     */
    @Override
    public List<ProductSpecsVo> queryListByProductId(Integer pkProduct, Integer pkCountry) {
        return baseMapper.queryListByProductId(pkProduct,pkCountry);
    }
}
