Commit 70690812db0d5ba65c54ea1a477ca1b2dd337ac0
1 parent
1ba3a024d9
Exists in
master
and in
1 other branch
自测bug提交
Showing 3 changed files with 9 additions and 6 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/TemporaryBloodSugar.java
View file @
7069081
| 1 | 1 | package com.lyms.platform.pojo; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.result.BaseModel; |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 4 | 5 | |
| 5 | 6 | import java.util.Date; |
| 6 | 7 | import java.util.List; |
| 7 | 8 | import java.util.Map; |
| 8 | 9 | |
| 10 | +@Document(collection = "lyms_temporary_bloodSugar") | |
| 9 | 11 | public class TemporaryBloodSugar extends BaseModel { |
| 10 | 12 | private String id; |
| 11 | 13 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryBloodServiceImpl.java
View file @
7069081
| ... | ... | @@ -11,8 +11,6 @@ |
| 11 | 11 | import com.lyms.platform.operate.web.service.ITemporaryBloodService; |
| 12 | 12 | import com.lyms.platform.operate.web.service.PatientWeightService; |
| 13 | 13 | import com.lyms.platform.operate.web.utils.ReportConfig; |
| 14 | -import com.lyms.platform.pojo.BloodPressure; | |
| 15 | -import com.lyms.platform.pojo.Patients; | |
| 16 | 14 | import com.lyms.platform.pojo.TemporaryBloodModel; |
| 17 | 15 | import com.lyms.platform.pojo.XyPresentationModel; |
| 18 | 16 | import org.apache.commons.collections.CollectionUtils; |
| ... | ... | @@ -81,7 +79,6 @@ |
| 81 | 79 | } |
| 82 | 80 | |
| 83 | 81 | } |
| 84 | - | |
| 85 | 82 | @Override |
| 86 | 83 | public BaseResponse deleteTemporaryBlood(String id) { |
| 87 | 84 | mongoTemplate.updateFirst(Query.query(Criteria.where("_id").is(id)), Update.update("yn", 1), TemporaryBloodModel.class); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryWeightServiceImpl.java
View file @
7069081
| ... | ... | @@ -22,6 +22,7 @@ |
| 22 | 22 | import com.lyms.platform.permission.service.OrganizationService; |
| 23 | 23 | import com.lyms.platform.permission.service.UsersService; |
| 24 | 24 | import com.lyms.platform.pojo.*; |
| 25 | +import com.mongodb.WriteResult; | |
| 25 | 26 | import org.apache.commons.collections.MapUtils; |
| 26 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
| 27 | 28 | import org.springframework.data.domain.Sort; |
| ... | ... | @@ -98,9 +99,12 @@ |
| 98 | 99 | } |
| 99 | 100 | |
| 100 | 101 | @Override |
| 101 | - public BaseResponse deleteTemporaryWeight(String phone) { | |
| 102 | - mongoTemplate.updateFirst(Query.query(Criteria.where("_id").is(phone)), Update.update("yn", 0), TemporaryWeightModel.class); | |
| 103 | - return RespBuilder.buildSuccess(); | |
| 102 | + public BaseResponse deleteTemporaryWeight(String id) { | |
| 103 | + WriteResult s = mongoTemplate.updateFirst(Query.query(Criteria.where("_id").is(id)), Update.update("yn", 0), TemporaryWeightModel.class); | |
| 104 | + if (s.getN() >= 1) { | |
| 105 | + return RespBuilder.buildSuccess(); | |
| 106 | + } | |
| 107 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("请选择一条记录"); | |
| 104 | 108 | } |
| 105 | 109 | |
| 106 | 110 | @Override |