package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.domain.SysApplicationCase;
import com.ruoyi.system.mapper.SysApplicationCaseMapper;
import com.ruoyi.system.service.ISysApplicationCaseService;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.DateUtils;

@Service
public class SysApplicationCaseServiceImpl implements ISysApplicationCaseService
{
    @Autowired
    private SysApplicationCaseMapper sysApplicationCaseMapper;

    @Override
    public SysApplicationCase selectSysApplicationCaseById(Long id)
    {
        return sysApplicationCaseMapper.selectSysApplicationCaseById(id);
    }

    @Override
    public List<SysApplicationCase> selectSysApplicationCaseList(SysApplicationCase sysApplicationCase)
    {
        return sysApplicationCaseMapper.selectSysApplicationCaseList(sysApplicationCase);
    }

    @Override
    public int insertSysApplicationCase(SysApplicationCase sysApplicationCase)
    {
        sysApplicationCase.setCreateBy(SecurityUtils.getUsername());
        sysApplicationCase.setCreateTime(DateUtils.getNowDate());
        return sysApplicationCaseMapper.insertSysApplicationCase(sysApplicationCase);
    }

    @Override
    public int updateSysApplicationCase(SysApplicationCase sysApplicationCase)
    {
        sysApplicationCase.setUpdateBy(SecurityUtils.getUsername());
        sysApplicationCase.setUpdateTime(DateUtils.getNowDate());
        return sysApplicationCaseMapper.updateSysApplicationCase(sysApplicationCase);
    }

    @Override
    public int deleteSysApplicationCaseByIds(Long[] ids)
    {
        return sysApplicationCaseMapper.deleteSysApplicationCaseByIds(ids);
    }

    @Override
    public int deleteSysApplicationCaseById(Long id)
    {
        return sysApplicationCaseMapper.deleteSysApplicationCaseById(id);
    }
}
