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.FsStoreProductGroupMapper;
import com.fs.store.domain.FsStoreProductGroup;
import com.fs.store.service.IFsStoreProductGroupService;

/**
 * 商品组合Service业务层处理
 * 
 * @author fs
 * @date 2022-11-23
 */
@Service
public class FsStoreProductGroupServiceImpl implements IFsStoreProductGroupService 
{
    @Autowired
    private FsStoreProductGroupMapper fsStoreProductGroupMapper;

    /**
     * 查询商品组合
     * 
     * @param groupId 商品组合ID
     * @return 商品组合
     */
    @Override
    public FsStoreProductGroup selectFsStoreProductGroupById(Long groupId)
    {
        return fsStoreProductGroupMapper.selectFsStoreProductGroupById(groupId);
    }

    /**
     * 查询商品组合列表
     * 
     * @param fsStoreProductGroup 商品组合
     * @return 商品组合
     */
    @Override
    public List<FsStoreProductGroup> selectFsStoreProductGroupList(FsStoreProductGroup fsStoreProductGroup)
    {
        return fsStoreProductGroupMapper.selectFsStoreProductGroupList(fsStoreProductGroup);
    }

    /**
     * 新增商品组合
     * 
     * @param fsStoreProductGroup 商品组合
     * @return 结果
     */
    @Override
    public int insertFsStoreProductGroup(FsStoreProductGroup fsStoreProductGroup)
    {
        return fsStoreProductGroupMapper.insertFsStoreProductGroup(fsStoreProductGroup);
    }

    /**
     * 修改商品组合
     * 
     * @param fsStoreProductGroup 商品组合
     * @return 结果
     */
    @Override
    public int updateFsStoreProductGroup(FsStoreProductGroup fsStoreProductGroup)
    {
        return fsStoreProductGroupMapper.updateFsStoreProductGroup(fsStoreProductGroup);
    }

    /**
     * 批量删除商品组合
     * 
     * @param groupIds 需要删除的商品组合ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductGroupByIds(Long[] groupIds)
    {
        return fsStoreProductGroupMapper.deleteFsStoreProductGroupByIds(groupIds);
    }

    /**
     * 删除商品组合信息
     * 
     * @param groupId 商品组合ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreProductGroupById(Long groupId)
    {
        return fsStoreProductGroupMapper.deleteFsStoreProductGroupById(groupId);
    }

    @Override
    public FsStoreProductGroup selectFsStoreProductGroupByBarCode(String groupBarCode) {
        return fsStoreProductGroupMapper.selectFsStoreProductGroupByBarCode(groupBarCode);
    }
}
