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.FsUserLevelScrmMapper;
import com.fs.hisStore.domain.FsUserLevelScrm;
import com.fs.hisStore.service.IFsUserLevelScrmService;

/**
 * 用户等级记录Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsUserLevelScrmServiceImpl implements IFsUserLevelScrmService 
{
    @Autowired
    private FsUserLevelScrmMapper fsUserLevelMapper;

    /**
     * 查询用户等级记录
     * 
     * @param id 用户等级记录ID
     * @return 用户等级记录
     */
    @Override
    public FsUserLevelScrm selectFsUserLevelById(Long id)
    {
        return fsUserLevelMapper.selectFsUserLevelById(id);
    }

    /**
     * 查询用户等级记录列表
     * 
     * @param fsUserLevel 用户等级记录
     * @return 用户等级记录
     */
    @Override
    public List<FsUserLevelScrm> selectFsUserLevelList(FsUserLevelScrm fsUserLevel)
    {
        return fsUserLevelMapper.selectFsUserLevelList(fsUserLevel);
    }

    /**
     * 新增用户等级记录
     * 
     * @param fsUserLevel 用户等级记录
     * @return 结果
     */
    @Override
    public int insertFsUserLevel(FsUserLevelScrm fsUserLevel)
    {
        fsUserLevel.setCreateTime(DateUtils.getNowDate());
        return fsUserLevelMapper.insertFsUserLevel(fsUserLevel);
    }

    /**
     * 修改用户等级记录
     * 
     * @param fsUserLevel 用户等级记录
     * @return 结果
     */
    @Override
    public int updateFsUserLevel(FsUserLevelScrm fsUserLevel)
    {
        fsUserLevel.setUpdateTime(DateUtils.getNowDate());
        return fsUserLevelMapper.updateFsUserLevel(fsUserLevel);
    }

    /**
     * 批量删除用户等级记录
     * 
     * @param ids 需要删除的用户等级记录ID
     * @return 结果
     */
    @Override
    public int deleteFsUserLevelByIds(Long[] ids)
    {
        return fsUserLevelMapper.deleteFsUserLevelByIds(ids);
    }

    /**
     * 删除用户等级记录信息
     * 
     * @param id 用户等级记录ID
     * @return 结果
     */
    @Override
    public int deleteFsUserLevelById(Long id)
    {
        return fsUserLevelMapper.deleteFsUserLevelById(id);
    }
}
