package com.ruoyi.predict.service.impl;

import com.ruoyi.predict.domain.Bcr;
import com.ruoyi.predict.mapper.BcrMapper;
import com.ruoyi.predict.service.IBcrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * BcrService业务层处理
 *
 * @author hlf
 * @date 2021-08-12
 */
@Service
public class BcrServiceImpl implements IBcrService {
    @Autowired(required = false)
    private BcrMapper bcrMapper;

    /**
     * 查询Bcr
     *
     * @param bcrNo BcrID
     * @return Bcr
     */
    @Override
    public Bcr selectBcrById(Long bcrNo) {
        return bcrMapper.selectBcrById(bcrNo);
    }

    /**
     * 查询Bcr列表
     *
     * @param bcr Bcr
     * @return Bcr
     */
    @Override
    public List<Bcr> selectBcrList(Bcr bcr) {
        return bcrMapper.selectBcrList(bcr);
    }

    /**
     * 删除Bcr信息
     *
     * @param bcrNo BcrID
     * @return 结果
     */
    @Override
    public int deleteBcrById(Long bcrNo) {
        return bcrMapper.deleteBcrById(bcrNo);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int insertBcrList(List<Bcr> bcrList) {
        return bcrMapper.insertBcrList(bcrList);
    }

    @Override
    public List<Bcr> selectBcrByWturNo(Long wturNo) {
        return bcrMapper.selectBcrByWturNo(wturNo);
    }

    @Override
    public List<Bcr> selectBcrListIsNot0(Bcr bcr) {
        return bcrMapper.selectBcrListIsNot0(bcr);
    }
}
