From 8a6dd43d9bd8a9720c0fad354135fd89cce575c3 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Tue, 25 Aug 2020 16:49:43 +0800
Subject: [PATCH] update

---
 src/main/java/com/moral/service/impl/RealWeatherServiceImpl.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/moral/service/impl/RealWeatherServiceImpl.java b/src/main/java/com/moral/service/impl/RealWeatherServiceImpl.java
index d87e0b7..f1f07f7 100644
--- a/src/main/java/com/moral/service/impl/RealWeatherServiceImpl.java
+++ b/src/main/java/com/moral/service/impl/RealWeatherServiceImpl.java
@@ -138,9 +138,23 @@
             Map<String, Object> jsonMap = (Map<String, Object>) map.get("data");
             jsonMap.remove("obsTime");
             jsonMap.remove("icon");
+            String text = jsonMap.get("text").toString();
+            if(text.equals("���")){
+                jsonMap.put("condition","100");
+            }else if(text.equals("������")){
+                jsonMap.put("condition","80");
+            }else if(text.equals("���")){
+                jsonMap.put("condition","60");
+            }else if(text.equals("���������")){
+                jsonMap.put("condition","40");
+            }else if(text.equals("������")){
+                jsonMap.put("condition","20");
+            }else if(text.equals("���")){
+                jsonMap.put("condition","0");
+            }
             resultMap.put("json",JSONObject.toJSONString(jsonMap));
             resultList.add(resultMap);
         }
-        return realWeatherMapper.insertRealWeather(resultList);
+        return realWeatherMapper.insertRealWeather(null);
     }
 }

--
Gitblit v1.8.0