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.WpMttrAndMtbfDayMapper;
import com.gyee.frame.model.auto.WpMttrAndMtbfDay;
import com.gyee.frame.model.auto.WpMttrAndMtbfDayExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import org.springframework.stereotype.Service;

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

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

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

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

	
	@Override
	public int updateByExample(WpMttrAndMtbfDay record, WpMttrAndMtbfDayExample example) {
		
		return wpMttrAndMtbfDayMapper.updateByExample(record, example);
	}

	@Override
	public List<WpMttrAndMtbfDay> selectByExample(WpMttrAndMtbfDayExample example) {
		
		return wpMttrAndMtbfDayMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(WpMttrAndMtbfDayExample example) {
		
		return wpMttrAndMtbfDayMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(WpMttrAndMtbfDayExample example) {
		
		return wpMttrAndMtbfDayMapper.deleteByExample(example);
	}
	



}
