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.RMConfigMapper;
import com.gyee.frame.model.auto.RMConfig;
import com.gyee.frame.model.auto.RMConfigExample;
import com.gyee.frame.util.SnowflakeIdWorker;
import org.springframework.stereotype.Service;

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

/**
 * 线路 LineService
 * @Title: LineService.java 
 * @Package com.gyee.frame.service 
 * @author gyee_自动生成
 * @email 1@qq.com
 * @date 2019-12-31 14:58:09  
 **/
@Service
public class RMConfigService implements BaseService<RMConfig, RMConfigExample> {

	@Resource
	private RMConfigMapper rMConfigMapper;
	
      	   	      	      	      	      	      	      	      	      	      	


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

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

	
	@Override
	public int updateByExample(RMConfig record, RMConfigExample example) {
		
		return rMConfigMapper.updateByExample(record, example);
	}

	@Override
	public List<RMConfig> selectByExample(RMConfigExample example) {
		
		return rMConfigMapper.selectByExample(example);
	}

	
	@Override
	public long countByExample(RMConfigExample example) {
		
		return rMConfigMapper.countByExample(example);
	}

	
	@Override
	public int deleteByExample(RMConfigExample example) {
		
		return rMConfigMapper.deleteByExample(example);
	}
	


}
