fengxiang
2018-05-09 bea70a46a56bf17497cdce897fd6892bc4597035
getEquInfoByMac 提示改成中文的
1 files modified
12 ■■■■■ changed files
src/main/java/com/moral/controller/MobileController.java 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/moral/controller/MobileController.java
@@ -110,10 +110,14 @@
    @RequestMapping("getEquInfoByMac")
    public AppData<Map> getDeviceByMac(@RequestParam(value="mac", required=true)String mac) {
        Device device = deviceService.getDeviceByMac(mac,false);//不从缓存取
        Map<String,Object> deviceMap = new HashMap<>(BeanMap.create(device));
        deviceMap.put("monitorpointDetail",deviceMap.get("monitorPoint"));
        deviceMap.remove("monitorPoint");
        return new AppData<Map>(deviceMap);
        if(device!=null){
            Map<String,Object> deviceMap = new HashMap<>(BeanMap.create(device));
            deviceMap.put("monitorpointDetail",deviceMap.get("monitorPoint"));
            deviceMap.remove("monitorPoint");
            return new AppData<Map>(deviceMap);
        }else{
            return  new AppData("mac地址不存在",AppData.FAIL);
        }
    }
    /**