package com.pj.project.tb_car_no_color;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pj.project.tb_business_car.TbBusinessCar;
import com.pj.project.tb_business_car.TbBusinessCarMapper;
import com.pj.utils.so.SoMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.pj.utils.sg.*;

/**
 * Service: tb_car_no_color -- 车牌颜色
 * @author qzy 
 */
@Service
public class TbCarNoColorService extends ServiceImpl<TbCarNoColorMapper, TbCarNoColor> implements IService<TbCarNoColor> {

	/** 底层 Mapper 对象 */
	@Autowired
	TbCarNoColorMapper tbCarNoColorMapper;

	/** 增 */
	int add(TbCarNoColor t){
		return tbCarNoColorMapper.add(t);
	}

	/** 删 */
	int delete(Long id){
		return tbCarNoColorMapper.delete(id);
	}

	/** 改 */
	int update(TbCarNoColor t){
		return tbCarNoColorMapper.update(t);
	}

	/** 查 */
	TbCarNoColor getById(Long id){
		return tbCarNoColorMapper.getById(id);
	}

	/** 查集合 - 根据条件（参数为空时代表忽略指定条件） */  
	List<TbCarNoColor> getList(SoMap so) {
		return tbCarNoColorMapper.getList(so);	
	}


	public List<TbCarNoColor> getFreeColor() {
		QueryWrapper<TbCarNoColor>ew=new QueryWrapper<>();
		ew.eq("fee",1);
		return list(ew);
	}
}
