Commit 6b9750b222b931c79252cc826a87253054f65569

Authored by litao@lymsh.com
1 parent babd8ae744

12333

Showing 1 changed file with 3 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java View file @ 6b9750b
... ... @@ -14,6 +14,7 @@
14 14 import com.lyms.platform.operate.web.utils.MongoUtil;
15 15 import com.lyms.platform.pojo.*;
16 16 import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.data.domain.Sort;
17 18 import org.springframework.data.mongodb.core.MongoTemplate;
18 19 import org.springframework.data.mongodb.core.query.Criteria;
19 20 import org.springframework.data.mongodb.core.query.Query;
... ... @@ -56,7 +57,7 @@
56 57 patientCriteria.orOperator(Criteria.where("phone").regex(key), Criteria.where("username").regex(key), Criteria.where("cardNo").is(key));
57 58 residentCriteria.orOperator(Criteria.where("phone").regex(key), Criteria.where("username").regex(key), Criteria.where("certificateNum").is(key));
58 59 }
59   - PageResult mongoPage = findMongoPage(Patients.class, Query.query(patientCriteria), page, limit);
  60 + PageResult mongoPage = findMongoPage(Patients.class, Query.query(patientCriteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit);
60 61 List<Patients> patients = null;
61 62 if(mongoPage.getCount() >= limit) {
62 63 patients = (List<Patients>) mongoPage.getGrid();
... ... @@ -110,7 +111,7 @@
110 111 temp.put("chfcCount", 0); // 复查次数
111 112 restList.add(temp);
112 113 }
113   - return RespBuilder.buildSuccess(new PageResult(restList.size(), page, limit, CollectionUtils.getPageIds(restList, page, limit)));
  114 + return RespBuilder.buildSuccess("tabList", new PageResult(restList.size(), page, limit, CollectionUtils.getPageIds(restList, page, limit)));
114 115 }
115 116  
116 117 /**