package com.fs.hisStore.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.hisStore.mapper.FsStoreShopStaffScrmMapper;
import com.fs.hisStore.domain.FsStoreShopStaffScrm;
import com.fs.hisStore.service.IFsStoreShopStaffScrmService;

/**
 * 门店店员Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsStoreShopStaffScrmServiceImpl implements IFsStoreShopStaffScrmService
{
    @Autowired
    private FsStoreShopStaffScrmMapper fsStoreShopStaffMapper;

    /**
     * 查询门店店员
     * 
     * @param id 门店店员ID
     * @return 门店店员
     */
    @Override
    public FsStoreShopStaffScrm selectFsStoreShopStaffById(Long id)
    {
        return fsStoreShopStaffMapper.selectFsStoreShopStaffById(id);
    }

    /**
     * 查询门店店员列表
     * 
     * @param fsStoreShopStaff 门店店员
     * @return 门店店员
     */
    @Override
    public List<FsStoreShopStaffScrm> selectFsStoreShopStaffList(FsStoreShopStaffScrm fsStoreShopStaff)
    {
        return fsStoreShopStaffMapper.selectFsStoreShopStaffList(fsStoreShopStaff);
    }

    /**
     * 新增门店店员
     * 
     * @param fsStoreShopStaff 门店店员
     * @return 结果
     */
    @Override
    public int insertFsStoreShopStaff(FsStoreShopStaffScrm fsStoreShopStaff)
    {
        fsStoreShopStaff.setCreateTime(DateUtils.getNowDate());
        return fsStoreShopStaffMapper.insertFsStoreShopStaff(fsStoreShopStaff);
    }

    /**
     * 修改门店店员
     * 
     * @param fsStoreShopStaff 门店店员
     * @return 结果
     */
    @Override
    public int updateFsStoreShopStaff(FsStoreShopStaffScrm fsStoreShopStaff)
    {
        fsStoreShopStaff.setUpdateTime(DateUtils.getNowDate());
        return fsStoreShopStaffMapper.updateFsStoreShopStaff(fsStoreShopStaff);
    }

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

    /**
     * 删除门店店员信息
     * 
     * @param id 门店店员ID
     * @return 结果
     */
    @Override
    public int deleteFsStoreShopStaffById(Long id)
    {
        return fsStoreShopStaffMapper.deleteFsStoreShopStaffById(id);
    }
}
