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.WpMttrAndMtbfYearMapper;
import com.gyee.frame.model.auto.WpMttrAndMtbfYear;
import com.gyee.frame.model.auto.WpMttrAndMtbfYearExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import org.springframework.stereotype.Service;

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

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

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

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

	
	@Override
	public int updateByExample(WpMttrAndMtbfYear record, WpMttrAndMtbfYearExample example) {
		
		return wpMttrAndMtbfYearMapper.updateByExample(record, example);
	}

	@Override
	public List<WpMttrAndMtbfYear> selectByExample(WpMttrAndMtbfYearExample example) {
		
		return wpMttrAndMtbfYearMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(WpMttrAndMtbfYearExample example) {
		
		return wpMttrAndMtbfYearMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(WpMttrAndMtbfYearExample example) {
		
		return wpMttrAndMtbfYearMapper.deleteByExample(example);
	}
	



}
