package com.dcsoft.system.service.impl;

import java.util.List;
import com.dcsoft.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dcsoft.system.mapper.SysManageRecordMapper;
import com.dcsoft.system.domain.SysManageRecord;
import com.dcsoft.system.service.ISysManageRecordService;

/**
 * 授权管理记录Service业务层处理
 *
 * @author dcsoft
 * @date 2023-03-08
 */
@Service
public class SysManageRecordServiceImpl implements ISysManageRecordService
{
    @Autowired
    private SysManageRecordMapper sysManageRecordMapper;

    /**
     * 查询授权管理记录
     *
     * @param id 授权管理记录主键
     * @return 授权管理记录
     */
    @Override
    public SysManageRecord selectSysManageRecordById(Long id)
    {
        return sysManageRecordMapper.selectSysManageRecordById(id);
    }

    /**
     * 查询授权管理记录列表
     *
     * @param sysManageRecord 授权管理记录
     * @return 授权管理记录
     */
    @Override
    public List<SysManageRecord> selectSysManageRecordList(SysManageRecord sysManageRecord)
    {
        return sysManageRecordMapper.selectSysManageRecordList(sysManageRecord);
    }

    /**
     * 新增授权管理记录
     *
     * @param sysManageRecord 授权管理记录
     * @return 结果
     */
    @Override
    public int insertSysManageRecord(SysManageRecord sysManageRecord)
    {
        sysManageRecord.setCreateTime(DateUtils.getNowDate());
        return sysManageRecordMapper.insertSysManageRecord(sysManageRecord);
    }

    /**
     * 修改授权管理记录
     *
     * @param sysManageRecord 授权管理记录
     * @return 结果
     */
    @Override
    public int updateSysManageRecord(SysManageRecord sysManageRecord)
    {
        sysManageRecord.setUpdateTime(DateUtils.getNowDate());
        return sysManageRecordMapper.updateSysManageRecord(sysManageRecord);
    }

    /**
     * 批量删除授权管理记录
     *
     * @param ids 需要删除的授权管理记录主键
     * @return 结果
     */
    @Override
    public int deleteSysManageRecordByIds(Long[] ids)
    {
        return sysManageRecordMapper.deleteSysManageRecordByIds(ids);
    }

    /**
     * 删除授权管理记录信息
     *
     * @param id 授权管理记录主键
     * @return 结果
     */
    @Override
    public int deleteSysManageRecordById(Long id)
    {
        return sysManageRecordMapper.deleteSysManageRecordById(id);
    }
}
