Przeglądaj źródła

优化交易记录

liaijie 3 lat temu
rodzic
commit
0838464ff8

+ 6 - 4
src/main/java/com/izouma/nineth/service/AssetService.java

@@ -472,10 +472,12 @@ public class AssetService {
         });
 
         List<UserHistory> content = map.getContent();
-        content.removeAll(Collections.singleton(null));
-        Pageable pageable = PageRequest.of(pageQuery.getPage() - 1, pageQuery.getSize());
-        Page<UserHistory> pageFromList = PageUtil.createPageFromList(content, pageable);
-        return pageFromList;
+        if (content!=null&&content.size()>0){
+            content.removeAll(Collections.singleton(null));
+            Pageable pageable = PageRequest.of(pageQuery.getPage() - 1, pageQuery.getSize());
+            map = PageUtil.createPageFromList(content, pageable);
+        }
+        return map;
     }
 
     public String mint(LocalDateTime time) {