Browse Source

修复会员列表购药历史查询BUG

auqfypeu 4 years ago
parent
commit
cfcf379cb5

+ 3 - 1
member-services/src/main/java/com/liangjian/dataplatform/member/service/impl/PurchaseHistoryService.java

@@ -97,6 +97,9 @@ public class PurchaseHistoryService implements IPurchaseHistoryService {
 
 
         HashMap<String, Object> ret = new HashMap<>();
+        List<Map<String, Object>> retList = new ArrayList<Map<String, Object>>();
+        ret.put("items",retList);
+        ret.put("totalCount",0);
 
         int start = 0;
         String filter = "";
@@ -129,7 +132,6 @@ public class PurchaseHistoryService implements IPurchaseHistoryService {
         List<Map<String, Object>> histList = (List<Map<String, Object>>)hitsMap.get("hits");
 
         if (histList != null && histList.size() > 0){
-            List<Map<String, Object>> retList = new ArrayList<Map<String, Object>>();
             for (Map<String, Object> stringObjectMap : histList) {
                 Map<String, Object> source = (Map<String, Object>) stringObjectMap.get("_source");
                 source.put("_id",stringObjectMap.get("_id"));