| | |
| | | String nextDayTemp = dataMap.get("temp").toString(); |
| | | String nextDayCloud = dataMap.get("cloud").toString(); |
| | | Integer condition = Integer.valueOf(dataMap.get("condition").toString()); |
| | | String value=""; |
| | | Integer value=0; |
| | | if (condition >= 80) { |
| | | value = "80"; |
| | | value = 80; |
| | | } else if (condition >= 40) { |
| | | value = "40"; |
| | | value = 40; |
| | | } else if (condition >= 0) { |
| | | value = "0"; |
| | | value = 0; |
| | | } |
| | | map.put("condition", value); |
| | | List<Map<String, Object>> tempAndCloudList = realWeatherMapper.getTempAndCloud(map); |
| | |
| | | and time >= #{startTime} |
| | | AND time <![CDATA[<]]> #{endTime} |
| | | and DATE_FORMAT(time,'%H:%i:%s')=#{time} |
| | | and json->'$.condition'>=#{condition} |
| | | and cast(json->'$.condition' as UNSIGNED INTEGER)>=#{condition} |
| | | </select> |
| | | </mapper> |