package com.gyee.frame.service;

import com.gyee.frame.common.base.BaseService;
import com.gyee.frame.common.support.Convert;
import com.gyee.frame.mapper.auto.StopAnalysismainVoMapper;
import com.gyee.frame.model.auto.StopAnalysismainVo;
import com.gyee.frame.model.auto.StopAnalysismainVoExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 风机信息表 StopAnalysismainVoService
 * @Title: StopAnalysismainVoService.java 
 * @Package com.gyee.frame.service 
 * @author gyee_自动生成
 * @email 1@qq.com
 * @date 2019-12-30 17:00:04  
 **/
@Service
public class StopAnalysismainVoService implements BaseService<StopAnalysismainVo, StopAnalysismainVoExample> {
	@Resource
	private StopAnalysismainVoMapper stopAnalysismainVoMapper;
	

	@Override
	public int deleteByPrimaryKey(String ids) {
				
			List<String> lista=Convert.toListStrArray(ids);
			StopAnalysismainVoExample example=new StopAnalysismainVoExample();
			example.createCriteria().andIdIn(lista);
			return stopAnalysismainVoMapper.deleteByExample(example);
			
				
	}
	
	
	@Override
	public StopAnalysismainVo selectByPrimaryKey(String id) {
				
			return stopAnalysismainVoMapper.selectByPrimaryKey(id);
				
	}

	
	@Override
	public int updateByPrimaryKeySelective(StopAnalysismainVo record) {
		return stopAnalysismainVoMapper.updateByPrimaryKeySelective(record);
	}
	
	
	/**
	 * 添加
	 */
	@Override
	public int insertSelective(StopAnalysismainVo record) {
				

			
				
		return stopAnalysismainVoMapper.insertSelective(record);
	}
	
	
	@Override
	public int updateByExampleSelective(StopAnalysismainVo record, StopAnalysismainVoExample example) {
		
		return stopAnalysismainVoMapper.updateByExampleSelective(record, example);
	}

	
	@Override
	public int updateByExample(StopAnalysismainVo record, StopAnalysismainVoExample example) {
		
		return stopAnalysismainVoMapper.updateByExample(record, example);
	}

	@Override
	public List<StopAnalysismainVo> selectByExample(StopAnalysismainVoExample example) {
		
		return stopAnalysismainVoMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(StopAnalysismainVoExample example) {
		
		return stopAnalysismainVoMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(StopAnalysismainVoExample example) {
		
		return stopAnalysismainVoMapper.deleteByExample(example);
	}


	public int deleteAll() {

		return stopAnalysismainVoMapper.deleteAll();

	}

	public List<StopAnalysismainVo> findStopAnalysismainVoList() {


		List<StopAnalysismainVo> list=new ArrayList<>();

		StopAnalysismainVoExample example=new StopAnalysismainVoExample();
		example.setOrderByClause("wtid asc");

		list= stopAnalysismainVoMapper.selectByExample(example);

		return list;

	}
}
