package com.fs.store.service.impl;

import java.util.List;

import com.fs.store.dto.TemplateDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.store.mapper.FsShippingTemplatesFreeMapper;
import com.fs.store.domain.FsShippingTemplatesFree;
import com.fs.store.service.IFsShippingTemplatesFreeService;

/**
 * 免邮费Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsShippingTemplatesFreeServiceImpl implements IFsShippingTemplatesFreeService 
{
    @Autowired
    private FsShippingTemplatesFreeMapper fsShippingTemplatesFreeMapper;

    /**
     * 查询免邮费
     * 
     * @param id 免邮费ID
     * @return 免邮费
     */
    @Override
    public FsShippingTemplatesFree selectFsShippingTemplatesFreeById(Long id)
    {
        return fsShippingTemplatesFreeMapper.selectFsShippingTemplatesFreeById(id);
    }

    /**
     * 查询免邮费列表
     * 
     * @param fsShippingTemplatesFree 免邮费
     * @return 免邮费
     */
    @Override
    public List<FsShippingTemplatesFree> selectFsShippingTemplatesFreeList(FsShippingTemplatesFree fsShippingTemplatesFree)
    {
        return fsShippingTemplatesFreeMapper.selectFsShippingTemplatesFreeList(fsShippingTemplatesFree);
    }

    /**
     * 新增免邮费
     * 
     * @param fsShippingTemplatesFree 免邮费
     * @return 结果
     */
    @Override
    public int insertFsShippingTemplatesFree(FsShippingTemplatesFree fsShippingTemplatesFree)
    {
        return fsShippingTemplatesFreeMapper.insertFsShippingTemplatesFree(fsShippingTemplatesFree);
    }

    /**
     * 修改免邮费
     * 
     * @param fsShippingTemplatesFree 免邮费
     * @return 结果
     */
    @Override
    public int updateFsShippingTemplatesFree(FsShippingTemplatesFree fsShippingTemplatesFree)
    {
        return fsShippingTemplatesFreeMapper.updateFsShippingTemplatesFree(fsShippingTemplatesFree);
    }

    /**
     * 批量删除免邮费
     * 
     * @param ids 需要删除的免邮费ID
     * @return 结果
     */
    @Override
    public int deleteFsShippingTemplatesFreeByIds(Long[] ids)
    {
        return fsShippingTemplatesFreeMapper.deleteFsShippingTemplatesFreeByIds(ids);
    }

    /**
     * 删除免邮费信息
     * 
     * @param id 免邮费ID
     * @return 结果
     */
    @Override
    public int deleteFsShippingTemplatesFreeById(Long id)
    {
        return fsShippingTemplatesFreeMapper.deleteFsShippingTemplatesFreeById(id);
    }

    @Override
    public int selectCountByTemplateDTO(TemplateDTO mapValue) {
        return fsShippingTemplatesFreeMapper.selectCountByTemplateDTO(mapValue);
    }
}
