package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysWorkConfigMapper;
import com.ruoyi.system.domain.SysWorkConfig;
import com.ruoyi.system.service.ISysWorkConfigService;

/**
 * 参数配置Service业务层处理
 * 
 * @author qy
 * @date 2024-11-25
 */
@Service
public class SysWorkConfigServiceImpl implements ISysWorkConfigService 
{
    @Autowired
    private SysWorkConfigMapper sysWorkConfigMapper;

    /**
     * 查询参数配置
     * 
     * @param id 参数配置主键
     * @return 参数配置
     */
    @Override
    public SysWorkConfig selectSysWorkConfigById(Long id)
    {
        return sysWorkConfigMapper.selectSysWorkConfigById(id);
    }

    /**
     * 查询参数配置列表
     * 
     * @param sysWorkConfig 参数配置
     * @return 参数配置
     */
    @Override
    public List<SysWorkConfig> selectSysWorkConfigList(SysWorkConfig sysWorkConfig)
    {
        return sysWorkConfigMapper.selectSysWorkConfigList(sysWorkConfig);
    }

    /**
     * 新增参数配置
     * 
     * @param sysWorkConfig 参数配置
     * @return 结果
     */
    @Override
    public int insertSysWorkConfig(SysWorkConfig sysWorkConfig)
    {
        sysWorkConfig.setCreateTime(DateUtils.getNowDate());
        return sysWorkConfigMapper.insertSysWorkConfig(sysWorkConfig);
    }

    /**
     * 修改参数配置
     * 
     * @param sysWorkConfig 参数配置
     * @return 结果
     */
    @Override
    public int updateSysWorkConfig(SysWorkConfig sysWorkConfig)
    {
        sysWorkConfig.setUpdateTime(DateUtils.getNowDate());
        return sysWorkConfigMapper.updateSysWorkConfig(sysWorkConfig);
    }

    /**
     * 批量删除参数配置
     * 
     * @param ids 需要删除的参数配置主键
     * @return 结果
     */
    @Override
    public int deleteSysWorkConfigByIds(Long[] ids)
    {
        return sysWorkConfigMapper.deleteSysWorkConfigByIds(ids);
    }

    /**
     * 删除参数配置信息
     * 
     * @param id 参数配置主键
     * @return 结果
     */
    @Override
    public int deleteSysWorkConfigById(Long id)
    {
        return sysWorkConfigMapper.deleteSysWorkConfigById(id);
    }
}
