liuxiaolong
2019-05-06 a7bed6b4cfecd61ec153818945f982c5bb796b98
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
package com.cloud.attendance.controller;
 
import com.alibaba.fastjson.JSONObject;
import com.cloud.attendance.service.DeviceService;
import com.cloud.model.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
@Slf4j
@Api( value = "DeviceController",description = "设备数查询操作,与设备源接口相同")
@RestController
@RequestMapping("/api-a/cluster")
public class DeviceController {
 
    @Autowired
    private DeviceService deviceService;
 
    @RequestMapping(value = "getClusterDeviceTree",method = RequestMethod.POST)
    @ApiOperation(value = "无", notes = "获取设备树", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiImplicitParams({
    })
    public Object  getClusterDeviceTree(){
        List<JSONObject> clusterDeviceTree = deviceService.getClusterDeviceTree();
        return  clusterDeviceTree;
    }
 
}