Browse Source

优化天气服务 天气情况判断逻辑

develop
zhaoxianglong 9 months ago
parent
commit
f8025066c4
  1. 2
      zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java
  2. 3
      zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java

2
zc-business/src/main/java/com/zc/business/controller/WeatherForecastController.java

@ -293,7 +293,7 @@ public class WeatherForecastController extends BaseController {
Double rhu = jsonObject.getDouble("rhu"); Double rhu = jsonObject.getDouble("rhu");
if (rhu > UniversalEnum.SIXTY.getNumber()) { if (rhu > UniversalEnum.NINETY.getNumber()) {
jsonObject.put("weatherCondition", UniversalEnum.OVERCAST_SKY.getValue()); jsonObject.put("weatherCondition", UniversalEnum.OVERCAST_SKY.getValue());
jsonObject.put("weatherConditionCode", UniversalEnum.OVERCAST_SKY.getNumber()); jsonObject.put("weatherConditionCode", UniversalEnum.OVERCAST_SKY.getNumber());
} else { } else {

3
zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java

@ -1405,6 +1405,9 @@ public enum UniversalEnum {
// 70 // 70
SEVENTY(70, "70"), SEVENTY(70, "70"),
// 90
NINETY(90, "90"),
// 91 // 91
NINETY_ONE(91, "91"), NINETY_ONE(91, "91"),

Loading…
Cancel
Save