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;
|
}
|
|
}
|