package com.fs.store.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsStoreProductDetailsMapper;
import com.fs.store.domain.FsStoreProductDetails;
import com.fs.store.service.IFsStoreProductDetailsService;

/**
 * 商品详情Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsStoreProductDetailsServiceImpl implements IFsStoreProductDetailsService 
{
    @Autowired
    private FsStoreProductDetailsMapper fsStoreProductDetailsMapper;

    /**
     * 查询商品详情
     * 
     * @param detailsId 商品详情ID
     * @return 商品详情
     */
    @Override
    public FsStoreProductDetails selectFsStoreProductDetailsById(Long detailsId)
    {
        return fsStoreProductDetailsMapper.selectFsStoreProductDetailsById(detailsId);
    }

    /**
     * 查询商品详情列表
     * 
     * @param fsStoreProductDetails 商品详情
     * @return 商品详情
     */
    @Override
    public List<FsStoreProductDetails> selectFsStoreProductDetailsList(FsStoreProductDetails fsStoreProductDetails)
    {
        return fsStoreProductDetailsMapper.selectFsStoreProductDetailsList(fsStoreProductDetails);
    }

    /**
     * 新增商品详情
     * 
     * @param fsStoreProductDetails 商品详情
     * @return 结果
     */
    @Override
    public int insertFsStoreProductDetails(FsStoreProductDetails fsStoreProductDetails)
    {
        return fsStoreProductDetailsMapper.insertFsStoreProductDetails(fsStoreProductDetails);
    }

    /**
     * 修改商品详情
     * 
     * @param fsStoreProductDetails 商品详情
     * @return 结果
     */
    @Override
    public int updateFsStoreProductDetails(FsStoreProductDetails fsStoreProductDetails)
    {
        return fsStoreProductDetailsMapper.updateFsStoreProductDetails(fsStoreProductDetails);
    }

    /**
     * 批量删除商品详情
     * 
     * @param detailsIds 需要删除的商品详情ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductDetailsByIds(Long[] detailsIds)
    {
        return fsStoreProductDetailsMapper.deleteFsStoreProductDetailsByIds(detailsIds);
    }

    /**
     * 删除商品详情信息
     * 
     * @param detailsId 商品详情ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductDetailsById(Long detailsId)
    {
        return fsStoreProductDetailsMapper.deleteFsStoreProductDetailsById(detailsId);
    }
}
