package com.ruoyi.voluntary.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.voluntary.mapper.BusiCardsOpenDetailMapper;
import com.ruoyi.voluntary.domain.BusiCardsOpenDetail;
import com.ruoyi.voluntary.service.IBusiCardsOpenDetailService;

/**
 * 开卡详情Service业务层处理
 * 
 * @author voluntary
 * @date 2022-12-03
 */
@Service
public class BusiCardsOpenDetailServiceImpl implements IBusiCardsOpenDetailService 
{
    @Autowired
    private BusiCardsOpenDetailMapper busiCardsOpenDetailMapper;

    /**
     * 查询开卡详情
     * 
     * @param id 开卡详情主键
     * @return 开卡详情
     */
    @Override
    public BusiCardsOpenDetail selectBusiCardsOpenDetailById(Long id)
    {
        return busiCardsOpenDetailMapper.selectBusiCardsOpenDetailById(id);
    }

    /**
     * 查询开卡详情列表
     * 
     * @param busiCardsOpenDetail 开卡详情
     * @return 开卡详情
     */
    @Override
    public List<BusiCardsOpenDetail> selectBusiCardsOpenDetailList(BusiCardsOpenDetail busiCardsOpenDetail)
    {
        return busiCardsOpenDetailMapper.selectBusiCardsOpenDetailList(busiCardsOpenDetail);
    }

    /**
     * 新增开卡详情
     * 
     * @param busiCardsOpenDetail 开卡详情
     * @return 结果
     */
    @Override
    public int insertBusiCardsOpenDetail(BusiCardsOpenDetail busiCardsOpenDetail)
    {
        busiCardsOpenDetail.setCreateTime(DateUtils.getNowDate());
        return busiCardsOpenDetailMapper.insertBusiCardsOpenDetail(busiCardsOpenDetail);
    }

    @Override
    public int insertBatch(List<BusiCardsOpenDetail> bBusiCardsOpenDetails) {
        return busiCardsOpenDetailMapper.insertBatch(bBusiCardsOpenDetails);
    }

    /**
     * 修改开卡详情
     * 
     * @param busiCardsOpenDetail 开卡详情
     * @return 结果
     */
    @Override
    public int updateBusiCardsOpenDetail(BusiCardsOpenDetail busiCardsOpenDetail)
    {
        return busiCardsOpenDetailMapper.updateBusiCardsOpenDetail(busiCardsOpenDetail);
    }

    /**
     * 批量删除开卡详情
     * 
     * @param ids 需要删除的开卡详情主键
     * @return 结果
     */
    @Override
    public int deleteBusiCardsOpenDetailByIds(Long[] ids)
    {
        return busiCardsOpenDetailMapper.deleteBusiCardsOpenDetailByIds(ids);
    }

    /**
     * 删除开卡详情信息
     * 
     * @param id 开卡详情主键
     * @return 结果
     */
    @Override
    public int deleteBusiCardsOpenDetailById(Long id)
    {
        return busiCardsOpenDetailMapper.deleteBusiCardsOpenDetailById(id);
    }
}
