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.WtMttrAndMtbfDayMapper;
import com.gyee.frame.model.auto.WtMttrAndMtbfDay;
import com.gyee.frame.model.auto.WtMttrAndMtbfDayExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import org.springframework.stereotype.Service;

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

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

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

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

	
	@Override
	public int updateByExample(WtMttrAndMtbfDay record, WtMttrAndMtbfDayExample example) {
		
		return wtMttrAndMtbfDayMapper.updateByExample(record, example);
	}

	@Override
	public List<WtMttrAndMtbfDay> selectByExample(WtMttrAndMtbfDayExample example) {
		
		return wtMttrAndMtbfDayMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(WtMttrAndMtbfDayExample example) {
		
		return wtMttrAndMtbfDayMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(WtMttrAndMtbfDayExample example) {
		
		return wtMttrAndMtbfDayMapper.deleteByExample(example);
	}
	



}
