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.AlarmsnapMapper;
import com.gyee.frame.model.auto.Alarmsnap;
import com.gyee.frame.model.auto.AlarmsnapExample;
import org.springframework.stereotype.Service;

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


@Service
public class AlarmsnapService implements BaseService<Alarmsnap, AlarmsnapExample> {
	@Resource
	private AlarmsnapMapper alarmsnapMapper;
	

	@Override
	public int deleteByPrimaryKey(String ids) {
				
			List<Integer> lista=Convert.toIntArrayList(ids);
			AlarmsnapExample example=new AlarmsnapExample();
			example.createCriteria().andIdIn(lista);
			return alarmsnapMapper.deleteByExample(example);
			
				
	}
	
	
	@Override
	public Alarmsnap selectByPrimaryKey(String id) {
				
			return alarmsnapMapper.selectByPrimaryKey(Integer.valueOf(id));
				
	}

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

				
		return alarmsnapMapper.insertSelective(record);
	}
	
	
	@Override
	public int updateByExampleSelective(Alarmsnap record, AlarmsnapExample example) {
		
		return alarmsnapMapper.updateByExampleSelective(record, example);
	}

	
	@Override
	public int updateByExample(Alarmsnap record, AlarmsnapExample example) {
		
		return alarmsnapMapper.updateByExample(record, example);
	}

	@Override
	public List<Alarmsnap> selectByExample(AlarmsnapExample example) {
		
		return alarmsnapMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(AlarmsnapExample example) {
		
		return alarmsnapMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(AlarmsnapExample example) {
		
		return alarmsnapMapper.deleteByExample(example);
	}
	

}
