package com.railway.business.baseinfo.service.impl;

import com.railway.business.baseinfo.domain.BusZzdzxx;
import com.railway.business.baseinfo.domain.vo.BusSmartQueryVo;
import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
import com.railway.business.baseinfo.service.IBusZzdzxxService;
import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 支柱吊柱信息
* @author wuhonghao
* @date 2021/10/13
*/
@Service
@Transactional(readOnly = true)
public class BusZzdzxxServiceImpl implements IBusZzdzxxService{

	private final BusZzdzxxMapper busZzdzxxMapper;

	public BusZzdzxxServiceImpl(BusZzdzxxMapper busZzdzxxMapper) {
		this.busZzdzxxMapper = busZzdzxxMapper;
	}

	/**
	* 新增
	*/
	@Override
	@Transactional(rollbackFor = Exception.class)
	public int create(BusZzdzxx busZzdzxx) {
		return busZzdzxxMapper.insert(busZzdzxx);
	}

	/**
	* 删除
	*/
	@Override
	@Transactional(rollbackFor = Exception.class)
	public int delete(String[] ids) {
		int r =0;
		for (String id : ids) {
			int j = busZzdzxxMapper.delete(id);
			r = r + j;
		}
		return r;
	}

	/**
	* 更新
	*/
	@Override
	@Transactional(rollbackFor = Exception.class)
	public int update(BusZzdzxx busZzdzxx) {
		return busZzdzxxMapper.update(busZzdzxx);
	}

	/**
	* 获取单个
	*/
	@Override
	public BusZzdzxx getInfo(String id) {
		return busZzdzxxMapper.getInfo(id);
	}

	/**
	* 查询列表
	*/
	@Override
	public List<BusZzdzxx> getList(BusZzdzxx busZzdzxx) {
		return busZzdzxxMapper.getList(busZzdzxx);
	}

	/**
	 * 智能查询
	 */
	@Override
	public List<BusZzdzxx> smartQuery(BusSmartQueryVo busSmartQueryVo) {
		return busZzdzxxMapper.smartQuery(busSmartQueryVo);
	}
}
