Commit 5e44b1ef5e988156b5cd0f2be979d3c3bdb4ee84
1 parent
8ed4c7f1be
Exists in
master
and in
6 other branches
肌萎缩
Showing 1 changed file with 4 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmnFacade.java
View file @
5e44b1e
... | ... | @@ -50,12 +50,12 @@ |
50 | 50 | SmnModel smnModel = mongoTemplate.findOne(query, SmnModel.class); |
51 | 51 | if (smnModel != null) |
52 | 52 | { |
53 | - BeanUtils.copyProperties(smnModel,param); | |
54 | - param.setHospitalId(hospitalId); | |
55 | - param.setStatus(2); | |
53 | + BeanUtils.copyProperties(param,smnModel); | |
54 | + smnModel.setHospitalId(hospitalId); | |
55 | + smnModel.setStatus(2); | |
56 | 56 | Query query1 = Query.query(Criteria.where("id").is(smnModel.getId())); |
57 | 57 | Update update = MongoConvertHelper |
58 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(param)); | |
58 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(smnModel)); | |
59 | 59 | mongoTemplate.updateFirst(query1, update, SmnModel.class); |
60 | 60 | return new BaseResponse(); |
61 | 61 | } |