|
|
@@ -36,7 +36,7 @@ public class JsonController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/api/getWeather", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public String getWeather(String token) {
|
|
|
+ public String getWeather(String token, String city) {
|
|
|
WeatherBean weatherBean = new WeatherBean();
|
|
|
|
|
|
// 根据token查找用户
|
|
|
@@ -61,7 +61,7 @@ public class JsonController {
|
|
|
}*/
|
|
|
String currentDate = DateTool.getCurrentDate();
|
|
|
if (!TextUtils.equals(mLastWeatherDate, currentDate) || TextUtils.isEmpty(mWeatherBean.temperatureRange)) {
|
|
|
- mWeatherBean = WebTool.getWeatherInfo(weatherBean);
|
|
|
+ mWeatherBean = WebTool.getWeatherInfo(weatherBean, city);
|
|
|
mLastWeatherDate = currentDate;
|
|
|
}
|
|
|
return JSON.toJSONString(mWeatherBean);
|