package com.fs.his.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.his.mapper.FsUserLoginLogMapper;
import com.fs.his.domain.FsUserLoginLog;
import com.fs.his.service.IFsUserLoginLogService;

/**
 * 用户授权登录Service业务层处理
 * 
 * @author fs
 * @date 2024-02-23
 */
@Service
public class FsUserLoginLogServiceImpl implements IFsUserLoginLogService 
{
    @Autowired
    private FsUserLoginLogMapper fsUserLoginLogMapper;

    /**
     * 查询用户授权登录
     * 
     * @param id 用户授权登录主键
     * @return 用户授权登录
     */
    @Override
    public FsUserLoginLog selectFsUserLoginLogById(Long id)
    {
        return fsUserLoginLogMapper.selectFsUserLoginLogById(id);
    }

    /**
     * 查询用户授权登录列表
     * 
     * @param fsUserLoginLog 用户授权登录
     * @return 用户授权登录
     */
    @Override
    public List<FsUserLoginLog> selectFsUserLoginLogList(FsUserLoginLog fsUserLoginLog)
    {
        return fsUserLoginLogMapper.selectFsUserLoginLogList(fsUserLoginLog);
    }

    /**
     * 新增用户授权登录
     * 
     * @param fsUserLoginLog 用户授权登录
     * @return 结果
     */
    @Override
    public int insertFsUserLoginLog(FsUserLoginLog fsUserLoginLog)
    {
        fsUserLoginLog.setCreateTime(DateUtils.getNowDate());
        return fsUserLoginLogMapper.insertFsUserLoginLog(fsUserLoginLog);
    }

    /**
     * 修改用户授权登录
     * 
     * @param fsUserLoginLog 用户授权登录
     * @return 结果
     */
    @Override
    public int updateFsUserLoginLog(FsUserLoginLog fsUserLoginLog)
    {
        return fsUserLoginLogMapper.updateFsUserLoginLog(fsUserLoginLog);
    }

    /**
     * 批量删除用户授权登录
     * 
     * @param ids 需要删除的用户授权登录主键
     * @return 结果
     */
    @Override
    public int deleteFsUserLoginLogByIds(Long[] ids)
    {
        return fsUserLoginLogMapper.deleteFsUserLoginLogByIds(ids);
    }

    /**
     * 删除用户授权登录信息
     * 
     * @param id 用户授权登录主键
     * @return 结果
     */
    @Override
    public int deleteFsUserLoginLogById(Long id)
    {
        return fsUserLoginLogMapper.deleteFsUserLoginLogById(id);
    }
}
