|
@@ -2,9 +2,12 @@ package com.zhongshu.iot.server.core.controller.iot.openAPI;
|
|
|
|
|
|
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
import com.github.microservice.auth.security.type.AuthType;
|
|
|
-import com.github.microservice.busInfoModel.thing.*;
|
|
|
|
|
-import com.github.microservice.net.ResultContent;
|
|
|
|
|
|
|
+import com.github.microservice.busInfoModel.thing.IotThing2DeviceModel;
|
|
|
|
|
+import com.github.microservice.busInfoModel.thing.IotThing2DeviceSearch;
|
|
|
|
|
+import com.github.microservice.busInfoModel.thing.IotThingModel;
|
|
|
|
|
+import com.github.microservice.busInfoModel.thing.IotThingSearch;
|
|
|
import com.github.microservice.models.baseParam.IDParam;
|
|
import com.github.microservice.models.baseParam.IDParam;
|
|
|
|
|
+import com.github.microservice.net.ResultContent;
|
|
|
import com.zhongshu.iot.server.core.service.iot.IotThing2DeviceService;
|
|
import com.zhongshu.iot.server.core.service.iot.IotThing2DeviceService;
|
|
|
import com.zhongshu.iot.server.core.service.iot.IotThingService;
|
|
import com.zhongshu.iot.server.core.service.iot.IotThingService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
@@ -38,7 +41,6 @@ public class IotThingOpenAPIController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IotThing2DeviceService iotThing2DeviceService;
|
|
private IotThing2DeviceService iotThing2DeviceService;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
@ResourceAuth(value = "user", type = AuthType.User)
|
|
|
@Operation(summary = "物模型列表-分页查询")
|
|
@Operation(summary = "物模型列表-分页查询")
|
|
|
@RequestMapping(value = {"page"}, method = {RequestMethod.POST})
|
|
@RequestMapping(value = {"page"}, method = {RequestMethod.POST})
|
|
@@ -65,19 +67,4 @@ public class IotThingOpenAPIController {
|
|
|
@Parameter(required = false) IotThing2DeviceSearch param) {
|
|
@Parameter(required = false) IotThing2DeviceSearch param) {
|
|
|
return iotThing2DeviceService.page(pageable, param);
|
|
return iotThing2DeviceService.page(pageable, param);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
|
|
- @Operation(summary = "删除物模型下的设备")
|
|
|
|
|
- @RequestMapping(value = {"deleteDevice"}, method = {RequestMethod.POST})
|
|
|
|
|
- public ResultContent deleteDevice(@RequestBody IDParam param) {
|
|
|
|
|
- return iotThing2DeviceService.delete(param.getId());
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @ResourceAuth(value = "user", type = AuthType.User)
|
|
|
|
|
- @Operation(summary = "物模型绑定设备(手动创建的才行)")
|
|
|
|
|
- @RequestMapping(value = {"bindDevices"}, method = {RequestMethod.POST})
|
|
|
|
|
- public ResultContent bindDevices(@RequestBody IotThing2DeviceBind param) {
|
|
|
|
|
- return iotThing2DeviceService.bindDevices(param);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|