| | |
| | | import com.fzzy.api.service.*; |
| | | import com.fzzy.api.utils.ContextUtil; |
| | | import com.fzzy.api.utils.RedisUtil; |
| | | import com.fzzy.data.ConfigData; |
| | | import com.fzzy.gateway.api.GatewayRemoteManager; |
| | | import com.fzzy.gateway.data.BaseReqData; |
| | | import com.fzzy.gateway.data.WeatherWebDto; |
| | |
| | | import com.fzzy.gateway.entity.GatewayDevice; |
| | | import com.fzzy.gateway.service.GatewayConfService; |
| | | import com.fzzy.gateway.util.GatewayHttpUtil; |
| | | import jdk.nashorn.internal.runtime.regexp.joni.Config; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | |
| | | private GatewayConfService confService; |
| | | @Resource |
| | | private GatewayRemoteManager gatewayRemoteManager; |
| | | @Resource |
| | | private ConfigData configData; |
| | | |
| | | |
| | | /** |
| | |
| | | public void doWeatherExe() { |
| | | |
| | | try { |
| | | String url = DEFAULT_URL; |
| | | String url = configData.getWeatherUrl(); |
| | | |
| | | url = url.replace("{appId}", DEFAULT_APP_ID).replace("{appsecret}", DEFAULT_APP_SECRET).replace("{cityid}", DEFAULT_CITYID); |
| | | |
| | | |
| | | log.debug("------气象URL---{}", url); |
| | | String result = GatewayHttpUtil.doGet(url, null); |
| | | log.debug("------气象请求信息URL---{}", url); |
| | | String result = GatewayHttpUtil.doGet(url); |
| | | |
| | | if (null == result) { |
| | | log.error("当前外网获取气象信息失败……"); |