diff --git a/src/main/java/club/joylink/rtss/controller/Map3dModelController.java b/src/main/java/club/joylink/rtss/controller/Map3dModelController.java index 669c2b2ac..51b878a3b 100644 --- a/src/main/java/club/joylink/rtss/controller/Map3dModelController.java +++ b/src/main/java/club/joylink/rtss/controller/Map3dModelController.java @@ -29,6 +29,7 @@ public class Map3dModelController { return this.iMap3dModelService.findAllModels(); } + @ApiOperation("按类型查询有效的数据") @GetMapping("") public List query(String resourceType) { return this.iMap3dModelService.query(resourceType); diff --git a/src/main/java/club/joylink/rtss/services/Map3dModelService.java b/src/main/java/club/joylink/rtss/services/Map3dModelService.java index 6d4218e0a..b1ee74235 100644 --- a/src/main/java/club/joylink/rtss/services/Map3dModelService.java +++ b/src/main/java/club/joylink/rtss/services/Map3dModelService.java @@ -59,7 +59,7 @@ public class Map3dModelService implements IMap3dModelService { @Override public List query(String resourceType) { Map3dModelExample example = new Map3dModelExample(); - example.createCriteria().andResourceTypeEqualTo(resourceType); + example.createCriteria().andResourceTypeEqualTo(resourceType).andStatusEqualTo(StatusEnum.Valid.getCode()); List map3dModels = map3dModelDAO.selectByExample(example); return map3dModels.stream().map(Map3dModelVO::new).collect(Collectors.toList()); }