From 8cc3c660bdaaaa6a46eecadb78e4e9c17a07c227 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 06 五月 2022 18:57:06 +0800
Subject: [PATCH] bug修复

---
 app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java b/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java
index e03f451..c200b56 100644
--- a/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java
+++ b/app/src/main/java/com/yeshi/makemoney/app/dao/goldcorn/GoldCornGetRecordDao.java
@@ -75,7 +75,7 @@
     }
 
     /**
-     * @return java.util.Map<com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               java.lang.Long>
+     * @return java.util.Map<com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               java.lang.Long>
      * @author hxh
      * @description 缁熻浜嬩欢鏁伴噺
      * @date 10:48 2022/4/28
@@ -91,9 +91,11 @@
         Map<GoldCornGetType, Long> resultMap = new HashMap<>();
         if (mapList != null) {
             for (Map map : mapList) {
-                GoldCornGetType type = GoldCornGetType.valueOf(map.get("_id")+"");
-                Long count = (Long) map.get("eventCount");
-                count = count == null ? 0L : count;
+                GoldCornGetType type = GoldCornGetType.valueOf(map.get("_id") + "");
+                Long count = 0L;
+                if (map.get("eventCount") != null) {
+                    count = Long.parseLong(map.get("eventCount") + "");
+                }
                 resultMap.put(type, count);
             }
         }

--
Gitblit v1.8.0