Commit c7ed556158253e57ae5490b095538dfc13cb1c10
1 parent
2d4b652944
Exists in
master
and in
6 other branches
改字段
Showing 1 changed file with 12 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
c7ed556
| ... | ... | @@ -350,6 +350,7 @@ |
| 350 | 350 | PlantformConfigModel plantformConfigModel = findPlatFormById(values[1]); |
| 351 | 351 | if(plantformConfigModel != null) { |
| 352 | 352 | tempMap.put("serchKey", plantformConfigModel.getSerchKey()); |
| 353 | + tempMap.put("parentId", plantformConfigModel.getParentId()); | |
| 353 | 354 | } |
| 354 | 355 | } |
| 355 | 356 | tempMap.put("id", values.length > 1 ? values[1] : ""); |
| ... | ... | @@ -358,6 +359,9 @@ |
| 358 | 359 | // tempMap.put("serchKey", values[0]); |
| 359 | 360 | tempMap.put("serchKey", ""); |
| 360 | 361 | } |
| 362 | + if(!tempMap.containsKey("parentId")) { | |
| 363 | + tempMap.put("parentId", "-1"); | |
| 364 | + } | |
| 361 | 365 | tempMap.put("value", values[0]); |
| 362 | 366 | rest.add(tempMap); |
| 363 | 367 | } |
| ... | ... | @@ -445,6 +449,14 @@ |
| 445 | 449 | return rest; |
| 446 | 450 | } |
| 447 | 451 | return null; |
| 452 | + } | |
| 453 | + | |
| 454 | + public List<Map<String, String>> findByParentId(String parentId) { | |
| 455 | + List<Map<String, String>> restList = new ArrayList<>(); | |
| 456 | + if(StringUtils.isNotEmpty(parentId)) { | |
| 457 | + mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId).and("yn").ne("0")), BasicConfig.class); | |
| 458 | + } | |
| 459 | + return restList; | |
| 448 | 460 | } |
| 449 | 461 | } |