package com.chinaitop.depot.intelligent.ventilation.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chinaitop.depot.intelligent.ventilation.mapper.BusinessApprovalMapper;
import com.chinaitop.depot.intelligent.ventilation.model.BusinessApproval;
import com.chinaitop.depot.intelligent.ventilation.model.BusinessApprovalExample;
import com.chinaitop.depot.intelligent.ventilation.service.BusinessApprovalService;


@Service
public class BusinessApprovalServiceImpl implements BusinessApprovalService {
    @Autowired
    private BusinessApprovalMapper businessApprovalMapper;
    
    @Override
    public List<BusinessApproval> queryByExample(BusinessApprovalExample example) {
        return businessApprovalMapper.selectByExample(example);
    }

    @Override
    public BusinessApproval findById(Integer id) {
        return businessApprovalMapper.selectByPrimaryKey(id);
    }

    @Override
    public void add(BusinessApproval businessApproval) {
        businessApprovalMapper.insert(businessApproval);
    }

    @Override
    public void update(BusinessApproval businessApproval) {
        businessApprovalMapper.updateByPrimaryKey(businessApproval);
    }

    @Override
    public void remove(Integer id) {
        businessApprovalMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void updateByPrimaryKeySelective(BusinessApproval oldBusinessApproval) {
        businessApprovalMapper.updateByPrimaryKeySelective(oldBusinessApproval);
    }

	@Override
	public void removeList(BusinessApprovalExample example) {
		businessApprovalMapper.deleteByExample(example);
	}

}
