/**
 *
 */
package com.diagbot.facade;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.diagbot.service.impl.RetrievalMappingServiceImpl;
import com.diagbot.util.ListUtil;

/**
 * @author rgb
 * @Description
 * @time 2018年12月5日下午4:53:59
 */
@Component
public class RetrievalMappingFacade extends RetrievalMappingServiceImpl {
	
	/**
	 * 根据标签id集合获取标签别名个数
	 * @param ids
	 * @return questionId-标签id，cou-别名个数
	 */
	public Map<Long,Long> getMapCouByQuesIds(List<Long> ids){
		Map<Long,Long> retMap = new HashMap<Long,Long>();
		if(ListUtil.isEmpty(ids)){
			return retMap;
		}
		this.baseMapper.getMapCouByQuesIds(ids).forEach(i->{
			retMap.put((Long)(i.get("questionId")), (Long)(i.get("cou")));
		});
		return retMap;
	}


}
