| | |
| | | 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); |
| | | } |
| | | } |