Commit 91a750d9d78e4baca5074647a300b7c21eb9410c
1 parent
f3aab027e5
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 3 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java
View file @
91a750d
... | ... | @@ -33,6 +33,7 @@ |
33 | 33 | import org.springframework.data.mongodb.core.MongoTemplate; |
34 | 34 | import org.springframework.data.mongodb.core.query.Criteria; |
35 | 35 | import org.springframework.data.mongodb.core.query.Query; |
36 | +import org.springframework.data.mongodb.core.query.Update; | |
36 | 37 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
37 | 38 | import org.springframework.stereotype.Component; |
38 | 39 | |
... | ... | @@ -1749,7 +1750,8 @@ |
1749 | 1750 | babyModel.setBabyAreaId(babyModel.getAreaId()); |
1750 | 1751 | babyModel.setBabyStreetId(babyModel.getStreetId()); |
1751 | 1752 | babyModel.setBabyAddress(babyModel.getAddress()); |
1752 | - babyBookbuildingService.updateBabyBuild(babyModel,babyModel.getId()); | |
1753 | + Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(babyModel)); | |
1754 | + mongoTemplate.upsert(Query.query(Criteria.where("id").is(babyModel.getId())), update, BabyModel.class); | |
1753 | 1755 | } |
1754 | 1756 | } |
1755 | 1757 | return null; |