package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.domain.SysSdgsat1Case;
import com.ruoyi.system.mapper.SysSdgsat1CaseMapper;
import com.ruoyi.system.service.ISysSdgsat1CaseService;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.DateUtils;

/**
 * SDGSAT-1 应用案例服务实现
 * 
 * @author ruoyi
 */
@Service
public class SysSdgsat1CaseServiceImpl implements ISysSdgsat1CaseService
{
    @Autowired
    private SysSdgsat1CaseMapper sysSdgsat1CaseMapper;

    @Override
    public SysSdgsat1Case selectSysSdgsat1CaseById(Long id)
    {
        return sysSdgsat1CaseMapper.selectSysSdgsat1CaseById(id);
    }

    @Override
    public List<SysSdgsat1Case> selectSysSdgsat1CaseList(SysSdgsat1Case sysSdgsat1Case)
    {
        return sysSdgsat1CaseMapper.selectSysSdgsat1CaseList(sysSdgsat1Case);
    }

    @Override
    public int insertSysSdgsat1Case(SysSdgsat1Case sysSdgsat1Case)
    {
        sysSdgsat1Case.setCreateBy(SecurityUtils.getUsername());
        sysSdgsat1Case.setCreateTime(DateUtils.getNowDate());
        return sysSdgsat1CaseMapper.insertSysSdgsat1Case(sysSdgsat1Case);
    }

    @Override
    public int updateSysSdgsat1Case(SysSdgsat1Case sysSdgsat1Case)
    {
        sysSdgsat1Case.setUpdateBy(SecurityUtils.getUsername());
        sysSdgsat1Case.setUpdateTime(DateUtils.getNowDate());
        return sysSdgsat1CaseMapper.updateSysSdgsat1Case(sysSdgsat1Case);
    }

    @Override
    public int deleteSysSdgsat1CaseByIds(Long[] ids)
    {
        return sysSdgsat1CaseMapper.deleteSysSdgsat1CaseByIds(ids);
    }

    @Override
    public int deleteSysSdgsat1CaseById(Long id)
    {
        return sysSdgsat1CaseMapper.deleteSysSdgsat1CaseById(id);
    }
}
