Commit e42a14bf15b56d595d4aadbee7605a055d5cf7a9

Authored by jiangjiazhi
1 parent 24300f3662

增加配置

Showing 6 changed files with 15 additions and 11 deletions

platform-biz-patient-service/pom.xml View file @ e42a14b
... ... @@ -37,9 +37,6 @@
37 37  
38 38 <finalName>platform-biz-patient-service</finalName>
39 39 </build>
40   - <profiles>
41   - <profile>
42   - </profile>
43   - </profiles>
  40 +
44 41 </project>
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PuerperaService.java View file @ e42a14b
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import java.util.List;
4 4  
  5 +import org.apache.commons.collections.CollectionUtils;
5 6 import org.apache.commons.lang.StringUtils;
6 7 import org.springframework.beans.factory.annotation.Autowired;
7 8 import org.springframework.data.domain.Sort.Direction;
... ... @@ -45,8 +46,11 @@
45 46 * @return
46 47 */
47 48 public PuerperaModel findOnePuerperaByCardNo(PuerperaModelQuery puerperaQuery) {
48   -
49   - return iPuerperaDao.queryPuerpera(puerperaQuery.convertToQuery()).get(0);
  49 + List<PuerperaModel> result = iPuerperaDao.queryPuerpera(puerperaQuery.convertToQuery());
  50 + if(CollectionUtils.isEmpty(result)){
  51 + return result.get(0);
  52 + }
  53 + return null;
50 54 }
51 55  
52 56 public PuerperaModel findOnePuerperaById(String id) {
platform-dal/src/main/java/com/lyms/platform/query/PuerperaModelQuery.java View file @ e42a14b
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import java.util.Date;
4 4  
  5 +import org.bson.types.ObjectId;
5 6 import org.springframework.data.mongodb.core.query.Criteria;
6 7  
7 8 import com.lyms.platform.common.base.IConvertToNativeQuery;
... ... @@ -154,7 +155,7 @@
154 155 condition= condition.and("communityId", communityId, MongoOper.IS);
155 156 }
156 157 if(null!=id){
157   - condition= condition.and("id", id, MongoOper.IS);
  158 + condition= condition.and("id", new ObjectId(id), MongoOper.IS);
158 159 }
159 160 if(null!=cardNo){
160 161 condition=condition.and("cardno", cardNo, MongoOper.IS);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java View file @ e42a14b
... ... @@ -69,7 +69,11 @@
69 69 * @return
70 70 */
71 71 public BaseObjectResponse findOneByCardNo(String cardNo) {
72   - return doBiz(findOnePuerperaByCardNo(cardNo));
  72 + PuerperaModel puerperaModel= findOnePuerperaByCardNo(cardNo);
  73 + if (null == puerperaModel) {
  74 + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.DEPT_NOT_EXISTS).setErrormsg("产妇信息不存在");
  75 + }
  76 + return doBiz(puerperaModel);
73 77 }
74 78  
75 79 /**
platform-operate-api/src/main/java/com/lyms/platform/operate/web/inteceptor/TokenValidateInteceptor.java View file @ e42a14b
... ... @@ -35,8 +35,6 @@
35 35 */
36 36 public class TokenValidateInteceptor extends HandlerInterceptorAdapter {
37 37 @Autowired
38   - private TokenService tokenService;
39   - @Autowired
40 38 private UsersService usersService;
41 39  
42 40 public static boolean isSiteController(Object handler) {
platform-resource/resources/config-dev.properties View file @ e42a14b
1 1 mongo.db.host=localhost
2 2 mongo.db.port=27017
3   -mongo.db.dbname=dev_mongo
  3 +mongo.db.dbname=platform
4 4  
5 5  
6 6 mysql.db.name=platform