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.WarningClassifyMapper;
import com.gyee.frame.model.auto.WarningClassify;
import com.gyee.frame.model.auto.WarningClassifyExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class WarningClassifyService implements BaseService<WarningClassify, WarningClassifyExample> {
	@Resource
	private WarningClassifyMapper warningClassifyMapper;
	

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

	
	@Override
	public int updateByPrimaryKeySelective(WarningClassify record) {
		return warningClassifyMapper.updateByPrimaryKeySelective(record);
	}
	
	
	/**
	 * 添加
	 */
	@Override
	public int insertSelective(WarningClassify record) {
				
		//添加雪花主键id
		record.setId(SnowflakeIdWorker.getUUID());
			
				
		return warningClassifyMapper.insertSelective(record);
	}
	
	
	@Override
	public int updateByExampleSelective(WarningClassify record, WarningClassifyExample example) {
		
		return warningClassifyMapper.updateByExampleSelective(record, example);
	}

	
	@Override
	public int updateByExample(WarningClassify record, WarningClassifyExample example) {
		
		return warningClassifyMapper.updateByExample(record, example);
	}

	@Override
	public List<WarningClassify> selectByExample(WarningClassifyExample example) {
		
		return warningClassifyMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(WarningClassifyExample example) {
		
		return warningClassifyMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(WarningClassifyExample example) {
		
		return warningClassifyMapper.deleteByExample(example);
	}
	

}
