Compare commits

..

No commits in common. '703b6a94a9a51726bf8c38ca44196d8418698626' and '70ea70e475bc9a341b637ca3098ddd0da883b5a6' have entirely different histories.

  1. 31
      .gitignore
  2. 3
      hzims-service-api/weather-api/src/main/java/com/hnac/hzims/hzimsweather/HeWeatherInitialize.java
  3. 2
      hzims-service/weather/src/main/java/com/hnac/hzims/weather/aspect/WeatherCacheAspect.java

31
.gitignore vendored

@ -1,23 +1,8 @@
*.class *.idea
*.project /hzims-biz-common/target
# Mobile Tools for Java (J2ME) /hzims-service/*/target
.mtj.tmp/ /hzims-service-api/*/target
.springBeans log
# Package Files #
*.jar
*.war
*.ear
.DS_Store
hs_err_pid*
.factorypath
.project
.gradle/
.idea/
.settings/
*.iml
.classpath
build/
target/
*.logs
*.log
logs/

3
hzims-service-api/weather-api/src/main/java/com/hnac/hzims/hzimsweather/HeWeatherInitialize.java

@ -16,8 +16,7 @@ public class HeWeatherInitialize {
HeWeatherInitialize.publicId = publicId; HeWeatherInitialize.publicId = publicId;
HeWeatherInitialize.privateKey = privateKey; HeWeatherInitialize.privateKey = privateKey;
//HeWeatherInitialize.domain = "https://api.heweather.net"; //HeWeatherInitialize.domain = "https://api.heweather.net";
//HeWeatherInitialize.domain = "https://devapi.qweather.com"; HeWeatherInitialize.domain = "https://devapi.qweather.com";
HeWeatherInitialize.domain = "https://px5khukpur.re.qweatherapi.com";
HeWeatherInitialize.geoDomain = "https://geoapi.heweather.net"; HeWeatherInitialize.geoDomain = "https://geoapi.heweather.net";
} }

2
hzims-service/weather/src/main/java/com/hnac/hzims/weather/aspect/WeatherCacheAspect.java

@ -64,7 +64,7 @@ public class WeatherCacheAspect {
*/ */
private void saveCacheForHash(String key, String location, Object result,long timeout,TimeUnit unit) { private void saveCacheForHash(String key, String location, Object result,long timeout,TimeUnit unit) {
HeWeatherResponse response = (HeWeatherResponse) result; HeWeatherResponse response = (HeWeatherResponse) result;
if(null != response && null != response.getCode() && response.getCode().isOk()) { if(response.getCode().isOk()) {
redisTemplate.opsForHash().put(key,location,result); redisTemplate.opsForHash().put(key,location,result);
redisTemplate.expire(key,timeout,unit); redisTemplate.expire(key,timeout,unit);
} }

Loading…
Cancel
Save