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.AlertrulefailureMapper;
import com.gyee.frame.model.auto.Alertrulefailure;
import com.gyee.frame.model.auto.AlertrulefailureExample;
import org.springframework.stereotype.Service;

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

/**
 * 线路 AlertrulefailureService
 * @Title: AlertrulefailureService.java 
 * @Package com.gyee.frame.service 
 * @author gyee_自动生成
 * @email 1@qq.com
 * @date 2019-12-31 14:58:09  
 **/
@Service
public class AlertrulefailureService implements BaseService<Alertrulefailure, AlertrulefailureExample> {
	@Resource
	private AlertrulefailureMapper AlertrulefailureMapper;

	private final String QS = "0";
	private final String FD = "-1";
	private final String GF = "-2";

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

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

				
		return AlertrulefailureMapper.insertSelective(record);
	}
	
	
	@Override
	public int updateByExampleSelective(Alertrulefailure record, AlertrulefailureExample example) {
		
		return AlertrulefailureMapper.updateByExampleSelective(record, example);
	}

	
	@Override
	public int updateByExample(Alertrulefailure record, AlertrulefailureExample example) {
		
		return AlertrulefailureMapper.updateByExample(record, example);
	}

	@Override
	public List<Alertrulefailure> selectByExample(AlertrulefailureExample example) {
		
		return AlertrulefailureMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(AlertrulefailureExample example) {
		
		return AlertrulefailureMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(AlertrulefailureExample example) {
		
		return AlertrulefailureMapper.deleteByExample(example);
	}

	public List<Alertrulefailure> findAll() {

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

		AlertrulefailureExample example=new AlertrulefailureExample();
		list= AlertrulefailureMapper.selectByExample(example);
		return list;

	}


}
