package com.yanzhu.manage.service.impl;

import java.util.List;
import com.yanzhu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.BusExamQuestionResultMapper;
import com.yanzhu.manage.domain.BusExamQuestionResult;
import com.yanzhu.manage.service.IBusExamQuestionResultService;

/**
 * 题库问题Service业务层处理
 * 
 * @author JiangYuQi
 * @date 2024-08-25
 */
@Service
public class BusExamQuestionResultServiceImpl implements IBusExamQuestionResultService 
{
    @Autowired
    private BusExamQuestionResultMapper busExamQuestionResultMapper;

    /**
     * 查询题库问题
     * 
     * @param id 题库问题主键
     * @return 题库问题
     */
    @Override
    public BusExamQuestionResult selectBusExamQuestionResultById(Long id)
    {
        return busExamQuestionResultMapper.selectBusExamQuestionResultById(id);
    }

    /**
     * 查询题库问题列表
     * 
     * @param busExamQuestionResult 题库问题
     * @return 题库问题
     */
    @Override
    public List<BusExamQuestionResult> selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult)
    {
        return busExamQuestionResultMapper.selectBusExamQuestionResultList(busExamQuestionResult);
    }

    /**
     * 新增题库问题
     * 
     * @param busExamQuestionResult 题库问题
     * @return 结果
     */
    @Override
    public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult)
    {
        busExamQuestionResult.setCreateTime(DateUtils.getNowDate());
        return busExamQuestionResultMapper.insertBusExamQuestionResult(busExamQuestionResult);
    }

    /**
     * 修改题库问题
     * 
     * @param busExamQuestionResult 题库问题
     * @return 结果
     */
    @Override
    public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult)
    {
        busExamQuestionResult.setUpdateTime(DateUtils.getNowDate());
        return busExamQuestionResultMapper.updateBusExamQuestionResult(busExamQuestionResult);
    }

    /**
     * 批量删除题库问题
     * 
     * @param ids 需要删除的题库问题主键
     * @return 结果
     */
    @Override
    public int deleteBusExamQuestionResultByIds(Long[] ids)
    {
        return busExamQuestionResultMapper.deleteBusExamQuestionResultByIds(ids);
    }

    /**
     * 删除题库问题信息
     * 
     * @param id 题库问题主键
     * @return 结果
     */
    @Override
    public int deleteBusExamQuestionResultById(Long id)
    {
        return busExamQuestionResultMapper.deleteBusExamQuestionResultById(id);
    }
}
