package com.srs.comprehensive.service.impl;

import java.util.List;
import com.srs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.srs.comprehensive.mapper.SrsPaymentMapper;
import com.srs.comprehensive.domain.SrsPayment;
import com.srs.comprehensive.service.ISrsPaymentService;

/**
 * 费用表Service业务层处理
 * 
 * @author srs
 * @date 2023-07-24
 */
@Service
public class SrsPaymentServiceImpl implements ISrsPaymentService 
{
    @Autowired
    private SrsPaymentMapper srsPaymentMapper;

    /**
     * 查询费用表
     * 
     * @param id 费用表主键
     * @return 费用表
     */
    @Override
    public SrsPayment selectSrsPaymentById(Long id)
    {
        return srsPaymentMapper.selectSrsPaymentById(id);
    }

    /**
     * 查询费用表列表
     * 
     * @param srsPayment 费用表
     * @return 费用表
     */
    @Override
    public List<SrsPayment> selectSrsPaymentList(SrsPayment srsPayment)
    {
        return srsPaymentMapper.selectSrsPaymentList(srsPayment);
    }

    /**
     * 新增费用表
     * 
     * @param srsPayment 费用表
     * @return 结果
     */
    @Override
    public int insertSrsPayment(SrsPayment srsPayment)
    {
        srsPayment.setCreateTime(DateUtils.getNowDate());
        return srsPaymentMapper.insertSrsPayment(srsPayment);
    }

    /**
     * 修改费用表
     * 
     * @param srsPayment 费用表
     * @return 结果
     */
    @Override
    public int updateSrsPayment(SrsPayment srsPayment)
    {
        srsPayment.setUpdateTime(DateUtils.getNowDate());
        return srsPaymentMapper.updateSrsPayment(srsPayment);
    }

    /**
     * 批量删除费用表
     * 
     * @param ids 需要删除的费用表主键
     * @return 结果
     */
    @Override
    public int deleteSrsPaymentByIds(Long[] ids)
    {
        return srsPaymentMapper.deleteSrsPaymentByIds(ids);
    }

    /**
     * 删除费用表信息
     * 
     * @param id 费用表主键
     * @return 结果
     */
    @Override
    public int deleteSrsPaymentById(Long id)
    {
        return srsPaymentMapper.deleteSrsPaymentById(id);
    }
}
