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.SrsOrderMapper;
import com.srs.comprehensive.domain.SrsOrder;
import com.srs.comprehensive.service.ISrsOrderService;

/**
 * 支付订单Service业务层处理
 * 
 * @author srs
 * @date 2023-07-24
 */
@Service
public class SrsOrderServiceImpl implements ISrsOrderService 
{
    @Autowired
    private SrsOrderMapper srsOrderMapper;

    /**
     * 查询支付订单
     * 
     * @param id 支付订单主键
     * @return 支付订单
     */
    @Override
    public SrsOrder selectSrsOrderById(Long id)
    {
        return srsOrderMapper.selectSrsOrderById(id);
    }

    /**
     * 查询支付订单列表
     * 
     * @param srsOrder 支付订单
     * @return 支付订单
     */
    @Override
    public List<SrsOrder> selectSrsOrderList(SrsOrder srsOrder)
    {
        return srsOrderMapper.selectSrsOrderList(srsOrder);
    }

    /**
     * 新增支付订单
     * 
     * @param srsOrder 支付订单
     * @return 结果
     */
    @Override
    public int insertSrsOrder(SrsOrder srsOrder)
    {
        srsOrder.setCreateTime(DateUtils.getNowDate());
        return srsOrderMapper.insertSrsOrder(srsOrder);
    }

    /**
     * 修改支付订单
     * 
     * @param srsOrder 支付订单
     * @return 结果
     */
    @Override
    public int updateSrsOrder(SrsOrder srsOrder)
    {
        srsOrder.setUpdateTime(DateUtils.getNowDate());
        return srsOrderMapper.updateSrsOrder(srsOrder);
    }

    /**
     * 批量删除支付订单
     * 
     * @param ids 需要删除的支付订单主键
     * @return 结果
     */
    @Override
    public int deleteSrsOrderByIds(Long[] ids)
    {
        return srsOrderMapper.deleteSrsOrderByIds(ids);
    }

    /**
     * 删除支付订单信息
     * 
     * @param id 支付订单主键
     * @return 结果
     */
    @Override
    public int deleteSrsOrderById(Long id)
    {
        return srsOrderMapper.deleteSrsOrderById(id);
    }
}
