package com.fs.store.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsStoreShopMapper;
import com.fs.store.domain.FsStoreShop;
import com.fs.store.service.IFsStoreShopService;

/**
 * 门店自提Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsStoreShopServiceImpl implements IFsStoreShopService 
{
    @Autowired
    private FsStoreShopMapper fsStoreShopMapper;

    /**
     * 查询门店自提
     * 
     * @param id 门店自提ID
     * @return 门店自提
     */
    @Override
    public FsStoreShop selectFsStoreShopById(Long id)
    {
        return fsStoreShopMapper.selectFsStoreShopById(id);
    }

    /**
     * 查询门店自提列表
     * 
     * @param fsStoreShop 门店自提
     * @return 门店自提
     */
    @Override
    public List<FsStoreShop> selectFsStoreShopList(FsStoreShop fsStoreShop)
    {
        return fsStoreShopMapper.selectFsStoreShopList(fsStoreShop);
    }

    /**
     * 新增门店自提
     * 
     * @param fsStoreShop 门店自提
     * @return 结果
     */
    @Override
    public int insertFsStoreShop(FsStoreShop fsStoreShop)
    {
        fsStoreShop.setCreateTime(DateUtils.getNowDate());
        return fsStoreShopMapper.insertFsStoreShop(fsStoreShop);
    }

    /**
     * 修改门店自提
     * 
     * @param fsStoreShop 门店自提
     * @return 结果
     */
    @Override
    public int updateFsStoreShop(FsStoreShop fsStoreShop)
    {
        fsStoreShop.setUpdateTime(DateUtils.getNowDate());
        return fsStoreShopMapper.updateFsStoreShop(fsStoreShop);
    }

    /**
     * 批量删除门店自提
     * 
     * @param ids 需要删除的门店自提ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreShopByIds(Long[] ids)
    {
        return fsStoreShopMapper.deleteFsStoreShopByIds(ids);
    }

    /**
     * 删除门店自提信息
     * 
     * @param id 门店自提ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreShopById(Long id)
    {
        return fsStoreShopMapper.deleteFsStoreShopById(id);
    }
}
