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.TaosMapMapper;
import com.gyee.frame.model.auto.TaosMap;
import com.gyee.frame.model.auto.TaosMapExample;
import org.springframework.stereotype.Service;

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

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

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

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

				
		return taosMapMapper.insertSelective(record);
	}
	
	
	@Override
	public int updateByExampleSelective(TaosMap record, TaosMapExample example) {
		
		return taosMapMapper.updateByExampleSelective(record, example);
	}

	
	@Override
	public int updateByExample(TaosMap record, TaosMapExample example) {
		
		return taosMapMapper.updateByExample(record, example);
	}

	@Override
	public List<TaosMap> selectByExample(TaosMapExample example) {
		
		return taosMapMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(TaosMapExample example) {
		
		return taosMapMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(TaosMapExample example) {
		
		return taosMapMapper.deleteByExample(example);
	}

	public List<TaosMap> findTaosMap() {

		TaosMapExample example=new TaosMapExample();
		example.setOrderByClause(" id ");

		TaosMapExample.Criteria criteria =example.createCriteria();


		List<TaosMap> list= taosMapMapper.selectByExample(example);
		return list;

	}

}
