package com.fs.company.service.impl;

import com.fs.company.domain.CompanyOperLog;
import com.fs.company.mapper.CompanyOperLogMapper;
import com.fs.company.service.ICompanyOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 操作日志记录Service业务层处理
 *
 * @author fs
 * @date 2021-05-25
 */
@Service
public class CompanyOperLogServiceImpl implements ICompanyOperLogService
{
    @Autowired
    private CompanyOperLogMapper companyOperLogMapper;

    /**
     * 查询操作日志记录
     *
     * @param operId 操作日志记录ID
     * @return 操作日志记录
     */
    @Override
    public CompanyOperLog selectCompanyOperLogById(Long operId)
    {
        return companyOperLogMapper.selectCompanyOperLogById(operId);
    }

    /**
     * 查询操作日志记录列表
     *
     * @param companyOperLog 操作日志记录
     * @return 操作日志记录
     */
    @Override
    public List<CompanyOperLog> selectCompanyOperLogList(CompanyOperLog companyOperLog)
    {

        return companyOperLogMapper.selectCompanyOperLogList(companyOperLog);
    }

    /**
     * 新增操作日志记录
     *
     * @param companyOperLog 操作日志记录
     * @return 结果
     */
    @Override
    public int insertCompanyOperLog(CompanyOperLog companyOperLog)
    {
        return companyOperLogMapper.insertCompanyOperLog(companyOperLog);
    }

    /**
     * 修改操作日志记录
     *
     * @param companyOperLog 操作日志记录
     * @return 结果
     */
    @Override
    public int updateCompanyOperLog(CompanyOperLog companyOperLog)
    {
        return companyOperLogMapper.updateCompanyOperLog(companyOperLog);
    }

    /**
     * 批量删除操作日志记录
     *
     * @param operIds 需要删除的操作日志记录ID
     * @return 结果
     */
    @Override
    public int deleteCompanyOperLogByIds(Long[] operIds)
    {
        return companyOperLogMapper.deleteCompanyOperLogByIds(operIds);
    }

    /**
     * 删除操作日志记录信息
     *
     * @param operId 操作日志记录ID
     * @return 结果
     */
    @Override
    public int deleteCompanyOperLogById(Long operId)
    {
        return companyOperLogMapper.deleteCompanyOperLogById(operId);
    }

    @Override
    public int cleanOperLog(Long companyId) {
        return companyOperLogMapper.cleanOperLog(companyId);
    }


}
