package com.wechat.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wechat.global.message.InfoMsg;
import com.wechat.model.responseDto.ResultEntity;
import com.wechat.service.CommonService;
import com.wechat.service.MdeBoleInfoService;

@Controller
@RequestMapping("bole")
public class BoleInfoController {
	@Autowired
	private MdeBoleInfoService boleInfoService;
	@Autowired
	private CommonService commonService;
	/**
	 * 获取所有伯乐信息
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(method = RequestMethod.GET)
    @ResponseBody
    public ResultEntity<Map<String,Object>> getAllBole(HttpServletRequest req) throws Exception {
		Map<String,Object> map = boleInfoService.getAllBole(commonService.getLanguage(req));
		return new ResultEntity<Map<String,Object>>(InfoMsg.SUCCESS_REQUEST,map);
	}
}
