|
|
@@ -4,7 +4,9 @@ import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
import com.github.microservice.models.baseParam.NameModel;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
+import com.github.microservice.types.FunctionType;
|
|
|
import com.zhongshu.iot.client.model.iot.*;
|
|
|
+import com.zhongshu.iot.client.openApi.base.DeviceIdParam;
|
|
|
import com.zhongshu.iot.client.type.IotDataType;
|
|
|
import com.zhongshu.iot.server.core.service.iot.IotServiceImpl;
|
|
|
import com.zhongshu.iot.server.core.service.iot.IotTemplateManagerService;
|
|
|
@@ -142,42 +144,19 @@ public class IotController {
|
|
|
public ResultContent deviceBindIotTemplate(@RequestBody DeviceBindIotTemplate param) {
|
|
|
return iotService.deviceBindIotTemplate(param);
|
|
|
}
|
|
|
-//
|
|
|
-// //-------------------------- Topic start------------------------------
|
|
|
-// @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
-// @Operation(summary = "添加-编辑Topic", hidden = true)
|
|
|
-// @RequestMapping(value = "addIotTopic", method = {RequestMethod.POST})
|
|
|
-// public ResultContent addIotTopic(@RequestBody IotTopicParam param) {
|
|
|
-// Assert.hasText(param.getTopic(), "topic不能为空");
|
|
|
-// return iotService.addIotTopic(param);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
-// @Operation(summary = "Topic列表-分页查询", hidden = true)
|
|
|
-// @RequestMapping(value = {"pageIotTopic"}, method = {RequestMethod.POST})
|
|
|
-// public ResultContent<Page<IotTopicModel>> pageIotTopic(@Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
|
|
|
-// @Parameter(required = false) IotTopicSearch param) {
|
|
|
-// return iotService.pageIotTopic(pageable, param);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
-// @Operation(summary = "删除Topic", hidden = true)
|
|
|
-// @RequestMapping(value = "deleteIotTopic", method = {RequestMethod.GET})
|
|
|
-// public ResultContent deleteIotTopic(
|
|
|
-// @RequestParam(name = "id")
|
|
|
-// @Parameter(name = "id", description = "数据id") String id) {
|
|
|
-// return iotService.deleteIotTopic(id);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
-// @Operation(summary = "查询Topic", hidden = true)
|
|
|
-// @RequestMapping(value = "getIotTopic", method = {RequestMethod.GET})
|
|
|
-// public ResultContent<IotTopicModel> getIotTopic(
|
|
|
-// @RequestParam(name = "id")
|
|
|
-// @Parameter(name = "id", description = "数据id") String id) {
|
|
|
-// return iotService.getIotTopic(id);
|
|
|
-// }
|
|
|
-//
|
|
|
-// //-------------------------- Topic end--------------------------------
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "查询设备所有的 事件")
|
|
|
+ @RequestMapping(value = "getDeviceEventIotMain", method = {RequestMethod.POST})
|
|
|
+ public ResultContent getDeviceEventIotMain(@RequestBody DeviceIdParam param) {
|
|
|
+ return iotService.getDeviceIotMain(param.getDeviceId(), FunctionType.Event);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
+ @Operation(summary = "查询设备所有的 服务")
|
|
|
+ @RequestMapping(value = "getDeviceServerIotMain", method = {RequestMethod.POST})
|
|
|
+ public ResultContent getDeviceServerIotMain(@RequestBody DeviceIdParam param) {
|
|
|
+ return iotService.getDeviceIotMain(param.getDeviceId(), FunctionType.Server);
|
|
|
+ }
|
|
|
|
|
|
}
|