|
@@ -2,9 +2,15 @@ package org.jetlinks.community.device.web;
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
+import org.hswebframework.web.api.crud.entity.QueryParamEntity;
|
|
|
import org.hswebframework.web.authorization.annotation.Authorize;
|
|
import org.hswebframework.web.authorization.annotation.Authorize;
|
|
|
import org.hswebframework.web.authorization.annotation.Resource;
|
|
import org.hswebframework.web.authorization.annotation.Resource;
|
|
|
|
|
+import org.hswebframework.web.crud.service.ReactiveCrudService;
|
|
|
|
|
+import org.hswebframework.web.crud.web.reactive.ReactiveServiceCrudController;
|
|
|
|
|
+import org.jetlinks.community.device.entity.DeviceProductEntity;
|
|
|
|
|
+import org.jetlinks.community.device.entity.GeoEntity;
|
|
|
import org.jetlinks.community.device.service.LocalDeviceInstanceService;
|
|
import org.jetlinks.community.device.service.LocalDeviceInstanceService;
|
|
|
|
|
+import org.jetlinks.community.device.service.LocalGeoService;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -18,16 +24,22 @@ import reactor.core.publisher.Mono;
|
|
|
* @createTime 2021年09月22日 14:35:00
|
|
* @createTime 2021年09月22日 14:35:00
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("/geo")
|
|
|
|
|
|
|
+@RequestMapping("/geo/object")
|
|
|
@Authorize
|
|
@Authorize
|
|
|
@Resource(id = "geo-manager", name = "地理位置管理")
|
|
@Resource(id = "geo-manager", name = "地理位置管理")
|
|
|
@Tag(name = "地理位置管理")
|
|
@Tag(name = "地理位置管理")
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
-public class GeoController {
|
|
|
|
|
- private final LocalDeviceInstanceService deviceInstanceService;
|
|
|
|
|
|
|
+public class GeoController implements ReactiveServiceCrudController<GeoEntity, String> {
|
|
|
|
|
+ private final LocalGeoService geoService;
|
|
|
|
|
|
|
|
- @PostMapping("/object/_search/geo.json")
|
|
|
|
|
- public Mono<Object> search(){
|
|
|
|
|
- return Mono.empty();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/_search/geo.json")
|
|
|
|
|
+ public Mono<?> search(Mono<QueryParamEntity> filter){
|
|
|
|
|
+ return geoService.queryPager(filter);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ReactiveCrudService<GeoEntity, String> getService() {
|
|
|
|
|
+ return geoService;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|