|
@@ -1,8 +1,22 @@
|
|
|
package com.zhongshu.iot.server.core.controller.openAPi;
|
|
package com.zhongshu.iot.server.core.controller.openAPi;
|
|
|
|
|
|
|
|
|
|
+import com.github.microservice.auth.security.annotations.ResourceAuth;
|
|
|
|
|
+import com.github.microservice.auth.security.type.AuthType;
|
|
|
|
|
+import com.github.microservice.net.ResultContent;
|
|
|
|
|
+import com.zhongshu.iot.client.model.mqtt.DeviceInfoModel;
|
|
|
|
|
+import com.zhongshu.iot.client.model.mqtt.DeviceInfoSearchParam;
|
|
|
|
|
+import com.zhongshu.iot.client.openApi.model.DeviceInfoOpenAPIModel;
|
|
|
|
|
+import com.zhongshu.iot.server.core.service.openApi.DeviceIotOpenApiService;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
|
|
+import org.springframework.data.web.PageableDefault;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -17,5 +31,14 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@Tag(name = "设备管理-开放接口")
|
|
@Tag(name = "设备管理-开放接口")
|
|
|
public class DeviceIotOpenApiController {
|
|
public class DeviceIotOpenApiController {
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DeviceIotOpenApiService deviceIotOpenApiService;
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "设备列表-分页查询")
|
|
|
|
|
+ @RequestMapping(value = {"pageDevice"}, method = {RequestMethod.POST})
|
|
|
|
|
+ public ResultContent<Page<DeviceInfoOpenAPIModel>> pageDevice(@Parameter(hidden = true) @PageableDefault(page = 0, size = 10) Pageable pageable,
|
|
|
|
|
+ @Parameter(required = false) DeviceInfoSearchParam param) {
|
|
|
|
|
+ return deviceIotOpenApiService.pageDevice(pageable, param);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|