CarServiceImpl.java 1.71 KB
package com.glsx.publicservice.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.glsx.biz.common.base.entity.Carbrand;
import com.glsx.biz.common.base.entity.Carseries;
import com.glsx.biz.common.base.entity.Cartype;
import com.glsx.biz.common.base.service.CarbrandService;
import com.glsx.biz.common.base.service.CarseriesService;
import com.glsx.biz.common.base.service.CartypeService;
import com.glsx.publicservice.service.CarService;

@Service
public class CarServiceImpl implements CarService {

	@Autowired
	private CarbrandService carbrandService;
	@Autowired
	private CarseriesService carseriesService;
	@Autowired
	private CartypeService cartypeService;
	
	@Override
	public List<Carbrand> getCarbrandList() {
		// TODO Auto-generated method stub
		return carbrandService.getAllList();
	}
	
	@Override
	public List<Carseries> getCarseriesList(Integer bid) {
		// TODO Auto-generated method stub
		return carseriesService.getByCarbrandId(bid);
	}
	@Override
	public List<Cartype> getCartypeList(Integer seriesId) {
		// TODO Auto-generated method stub
		return cartypeService.getBySeiesId(seriesId);
	}

	@Override
	public Carbrand getCarbrandById(Integer bid) {
		// TODO Auto-generated method stub
		return carbrandService.findById(bid);
	}

	@Override
	public Carseries getCarseriesById(Integer seriesId) {
		// TODO Auto-generated method stub
		return carseriesService.findById(seriesId);
	}

	@Override
	public Cartype getCartypeById(Integer seriesId, Integer cartypeId) {
		// TODO Auto-generated method stub
		return cartypeService.get(seriesId, cartypeId);
	}

}