|
|
|
package com.zhonglai.luhui.mqtt.service.proxy.controller;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.zhonglai.luhui.device.domain.IotThingsModel;
|
|
|
|
import com.zhonglai.luhui.device.protocol.factory.config.DeviceCach;
|
|
|
|
import com.zhonglai.luhui.device.protocol.factory.control.DeviceCommandListenService;
|
|
|
|
import com.zhonglai.luhui.device.protocol.factory.service.IotThingsModelService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
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 java.util.Map;
|
|
|
|
|
|
|
|
@Api(tags = "系统运行接口")
|
|
|
|
@Controller
|
|
|
|
@RequestMapping("/sys")
|
|
|
|
public class SysConfigController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private IotThingsModelService thingsModelService;
|
|
|
|
@ApiOperation("获取缓存物模型")
|
|
|
|
@RequestMapping(value = "getIotThingsModelMap",method = RequestMethod.GET)
|
|
|
|
public AjaxResult getIotThingsModelMap()
|
|
|
|
{
|
|
|
|
return AjaxResult.success(thingsModelService.getIotThingsModelMap());
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取翻译缓存物模型")
|
|
|
|
@RequestMapping(value = "getIotProductTranslateMap",method = RequestMethod.GET)
|
|
|
|
public AjaxResult getIotProductTranslateMap()
|
|
|
|
{
|
|
|
|
return AjaxResult.success(thingsModelService.getIotProductTranslateMap());
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取缓存设备")
|
|
|
|
@RequestMapping(value = "getDeviceInfo",method = RequestMethod.GET)
|
|
|
|
public AjaxResult getDeviceInfo(String deviceInfoId)
|
|
|
|
{
|
|
|
|
return AjaxResult.success(DeviceCach.getDeviceInfo(deviceInfoId));
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("获取缓存主机")
|
|
|
|
@RequestMapping(value = "getDeviceHost",method = RequestMethod.GET)
|
|
|
|
public AjaxResult getDeviceHost(String deviceId)
|
|
|
|
{
|
|
|
|
return AjaxResult.success(DeviceCach.getDeviceHost(deviceId));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|