package com.ruoyi.szxc.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.szxc.mapper.SzxcWorkGuideMapper;
import com.ruoyi.szxc.domain.SzxcWorkGuide;
import com.ruoyi.szxc.service.ISzxcWorkGuideService;

/**
 * 办事指南Service业务层处理
 * 
 * @author hs
 * @date 2024-03-20
 */
@Service
public class SzxcWorkGuideServiceImpl implements ISzxcWorkGuideService 
{
    @Autowired
    private SzxcWorkGuideMapper szxcWorkGuideMapper;

    /**
     * 查询办事指南
     * 
     * @param id 办事指南主键
     * @return 办事指南
     */
    @Override
    public SzxcWorkGuide selectSzxcWorkGuideById(Long id)
    {
        return szxcWorkGuideMapper.selectSzxcWorkGuideById(id);
    }

    /**
     * 查询办事指南列表
     * 
     * @param szxcWorkGuide 办事指南
     * @return 办事指南
     */
    @Override
    public List<SzxcWorkGuide> selectSzxcWorkGuideList(SzxcWorkGuide szxcWorkGuide)
    {
        return szxcWorkGuideMapper.selectSzxcWorkGuideList(szxcWorkGuide);
    }

    /**
     * 新增办事指南
     * 
     * @param szxcWorkGuide 办事指南
     * @return 结果
     */
    @Override
    public int insertSzxcWorkGuide(SzxcWorkGuide szxcWorkGuide)
    {
        szxcWorkGuide.setCreateTime(DateUtils.getNowDate());
        return szxcWorkGuideMapper.insertSzxcWorkGuide(szxcWorkGuide);
    }

    /**
     * 修改办事指南
     * 
     * @param szxcWorkGuide 办事指南
     * @return 结果
     */
    @Override
    public int updateSzxcWorkGuide(SzxcWorkGuide szxcWorkGuide)
    {
        szxcWorkGuide.setUpdateTime(DateUtils.getNowDate());
        return szxcWorkGuideMapper.updateSzxcWorkGuide(szxcWorkGuide);
    }

    /**
     * 批量删除办事指南
     * 
     * @param ids 需要删除的办事指南主键
     * @return 结果
     */
    @Override
    public int deleteSzxcWorkGuideByIds(Long[] ids)
    {
        return szxcWorkGuideMapper.deleteSzxcWorkGuideByIds(ids);
    }

    /**
     * 删除办事指南信息
     * 
     * @param id 办事指南主键
     * @return 结果
     */
    @Override
    public int deleteSzxcWorkGuideById(Long id)
    {
        return szxcWorkGuideMapper.deleteSzxcWorkGuideById(id);
    }
}
