CarseriesService.java 1.93 KB
package com.bs.cardata.service;

import com.bs.cardata.entity.Carbrand;
import com.bs.cardata.entity.Carseries;
import com.bs.cardata.exception.ServiceException;

import java.util.Collection;
import java.util.List;

/**
 * 公共服务-汽车型号服务接口定义。
 * 
 * @author  Cruise.Xu
 */
public interface CarseriesService {

	/**
	 * 保存车系
	 * @param carseries
	 * @return
	 * @throws ServiceException
	 */
	public Boolean saveCarseries(Carseries carseries) throws ServiceException;

	/**
	 * 修改车系
	 * @param carseries
	 * @return
	 * @throws ServiceException
	 */
	public Boolean updateCarseries(Carseries carseries) throws ServiceException;
	/**
	 * 根据汽车品牌ID获取车系列表
	 * @param brandId 
	 * 					: 汽车品牌ID
	 * @return 汽车品牌列表
	 * @throws ServiceException
	 */
	public List<Carseries> getByCarbrandId(Integer brandId);

	/**
	 * 根据汽车品牌id以及父品牌id关联查找车系列表
	 * @param brandId
	 * @param parentBrandId
	 * @return
	 */
	public List<Carseries> listCarseriesByCarbrandId(Integer brandId, Integer parentBrandId);
	
	/**
	 * 通过汽车型号的ID获取单个汽车型号信息
	 * @param typeId 
	 * 				: 汽车型号ID
	 * @return 汽车型号信息
	 * @throws ServiceException
	 */
	public Carseries findById(Integer typeId);
	
	/**
	 * 查询所有车系
	 * @return
	 */
	public List<Carseries> getAllCarseies();

	/**
	 * 批量查询车系数据
	 * @param ids
	 * @return
	 */
	List<Carbrand> listCarseriesByIds(Collection<Integer> ids);

	/**
	 * 根据品牌id和车系id查询对应的值
	 * @param brandId
	 * @param seriesid
	 * @return
	 */
	public String getCarThridId(Integer brandId, Integer seriesid);
	
	/**
	 * [新接口 - 提供给ddbox调用] 根据汽车品牌ID获取车型列表
	 * @param brandId 
	 * 					: 汽车品牌ID
	 * @return 汽车品牌列表
	 * @throws ServiceException
	 */
	public String getCarseriesByBrandId(Integer brandId);
}