工业级运维app手机api
xufenglei
2017-11-03 eb48246d98cdf77e7ef65b64a2349d2974c6538a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.moral.monitor.controller;
 
import com.moral.monitor.entity.Equipment;
import com.moral.monitor.service.WeChatService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
 
import javax.annotation.Resource;
import java.util.Map;
 
/**
 * Created by a on 2017/5/26.
 */
@Controller
public class WeChatController {
    @Resource
    WeChatService weChatService;
    @RequestMapping("/detail")
    public ModelAndView weiXindetail(String mac, long time, String level ){
        Equipment equipment = weChatService.weiXindetail(mac);
        if (equipment==null){
            return null;
        }
 
        Map wxmap = weChatService.wxMap(mac, time);
 
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("equipment", equipment);
        modelAndView.addObject("time", time);
        modelAndView.addObject("level", level);
        modelAndView.addObject("wxmap",wxmap);
        modelAndView.setViewName("weixin");
 
        return modelAndView;
    }
 
}