package com.wechat.service;

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

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

import com.wechat.dao.MdeBoleInfoDao;
import com.wechat.model.dbEntity.MdeBoleInfo;

/**
 * 伯乐service类
 * @author tangwc
 *
 */
@Service
public class MdeBoleInfoService {
	@Autowired
	private MdeBoleInfoDao boleInfoDao;
	
	@Autowired
	private CommonService commonService;
	
	
	public Map<String, Object> getAllBole(String lang){
		List<MdeBoleInfo> list = commonService.addDomainUrl2BoleImg(boleInfoDao.getAllBole(lang));
		Map<String, Object> map = new HashMap<String, Object>();
		List<MdeBoleInfo> list1 = new ArrayList<MdeBoleInfo>();
		List<MdeBoleInfo> list2 = new ArrayList<MdeBoleInfo>();
		for(MdeBoleInfo info: list) {
			if(info.getBoleType().equals("1")) list1.add(info);
			if(info.getBoleType().equals("2")) list2.add(info);
		}
		map.put("honoraryAdvisor",list1);//荣誉顾问委员会
		map.put("careerDevelopmentMentor",list2);//职业发展导师团
		return map;
	}
}
