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.WtMttrAndMtbfYearMapper;
import com.gyee.frame.model.auto.WtMttrAndMtbfYear;
import com.gyee.frame.model.auto.WtMttrAndMtbfYearExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import org.springframework.stereotype.Service;

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

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

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

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

	
	@Override
	public int updateByExample(WtMttrAndMtbfYear record, WtMttrAndMtbfYearExample example) {
		
		return wtMttrAndMtbfYearMapper.updateByExample(record, example);
	}

	@Override
	public List<WtMttrAndMtbfYear> selectByExample(WtMttrAndMtbfYearExample example) {
		
		return wtMttrAndMtbfYearMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(WtMttrAndMtbfYearExample example) {
		
		return wtMttrAndMtbfYearMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(WtMttrAndMtbfYearExample example) {
		
		return wtMttrAndMtbfYearMapper.deleteByExample(example);
	}
	



}
