diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java index 7d7780f0..f4e5dd5a 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/controller/PlatformController.java @@ -70,13 +70,15 @@ public class PlatformController { } } - @GetMapping("/query/{count}/{page}") + @GetMapping("/query") @Operation(summary = "分页查询级联平台", security = @SecurityRequirement(name = JwtUtils.HEADER)) - @Parameter(name = "page", description = "当前页", required = true) - @Parameter(name = "count", description = "每页条数", required = true) - public PageInfo platforms(@PathVariable int page, @PathVariable int count) { + @Parameter(name = "page", description = "当前页") + @Parameter(name = "count", description = "每页查询数量") + @Parameter(name = "query", description = "查询内容") + public PageInfo platforms(int page, int count, + @RequestParam(required = false) String query) { - PageInfo parentPlatformPageInfo = platformService.queryPlatformList(page, count); + PageInfo parentPlatformPageInfo = platformService.queryPlatformList(page, count, query); if (parentPlatformPageInfo != null && !parentPlatformPageInfo.getList().isEmpty()) { for (Platform platform : parentPlatformPageInfo.getList()) { platform.setMobilePositionSubscribe(subscribeHolder.getMobilePositionSubscribe(platform.getServerGBId()) != null); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformMapper.java index 44df00bd..07f32d98 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/PlatformMapper.java @@ -62,15 +62,18 @@ public interface PlatformMapper { @Delete("DELETE FROM wvp_platform WHERE id=#{id}") int delete(@Param("id") Integer id); - @Select(" SELECT pp.*, " + + @Select(" ") + List queryList(@Param("query") String query); @Select("SELECT * FROM wvp_platform WHERE enable=#{enable} ") List getEnableParentPlatformList(boolean enable); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformService.java index a91a7b28..7d087160 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IPlatformService.java @@ -29,7 +29,7 @@ public interface IPlatformService { * @param count * @return */ - PageInfo queryPlatformList(int page, int count); + PageInfo queryPlatformList(int page, int count, String query); /** * 添加级联平台 diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformServiceImpl.java index c6536dcd..02ed3e34 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/PlatformServiceImpl.java @@ -156,9 +156,9 @@ public class PlatformServiceImpl implements IPlatformService { } @Override - public PageInfo queryPlatformList(int page, int count) { + public PageInfo queryPlatformList(int page, int count, String query) { PageHelper.startPage(page, count); - List all = platformMapper.queryList(); + List all = platformMapper.queryList(query); return new PageInfo<>(all); } diff --git a/web_src/src/components/PlatformList.vue b/web_src/src/components/PlatformList.vue index 9d1ac90d..ea46462e 100755 --- a/web_src/src/components/PlatformList.vue +++ b/web_src/src/components/PlatformList.vue @@ -4,6 +4,9 @@