Commit cf921cf7 by HlQ

格式化代码

1 parent 1ba251dd
package com.viontech.controller;
import com.viontech.service.impl.WeatherService;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* @author HlQ
......
......@@ -22,8 +22,8 @@ public class Aqi {
}
public String getValue() {
if(value==null){
value="0";
if (value == null) {
value = "0";
}
return value;
}
......@@ -97,7 +97,6 @@ public class Aqi {
}
// private String cityName;
// private String pubtime;
// private String value;
......@@ -121,5 +120,5 @@ public class Aqi {
// public String getValue() {
// return value;
// }
}
......@@ -2,70 +2,79 @@ package com.viontech.model;
public class City {
private Integer cityId;
private Integer cityId;
private String counname;
private String name;
private String pname;
private String timezone;
private Integer provinceId;
private String weatherCode;
private String cityName;
private String cityName;
private String provinceName;
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public Integer getCityId() {
return cityId;
}
this.cityId = cityId;
}
public Integer getCityId() {
return cityId;
}
public void setCounname(String counname) {
this.counname = counname;
}
public String getCounname() {
return counname;
}
this.counname = counname;
}
public String getCounname() {
return counname;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
this.name = name;
}
public String getName() {
return name;
}
public void setPname(String pname) {
this.pname = pname;
}
public String getPname() {
return pname;
}
this.pname = pname;
}
public String getPname() {
return pname;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public String getTimezone() {
return timezone;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
this.timezone = timezone;
}
public String getTimezone() {
return timezone;
}
public String getProvinceName() {
return provinceName;
}
public void setProvinceName(String provinceName) {
this.provinceName = provinceName;
}
public String getWeatherCode() {
return weatherCode;
......
......@@ -4,27 +4,32 @@ import java.util.List;
public class Data {
private Aqi aqi;
private City city;
private Aqi aqi;
private City city;
private List<Forecast> forecast;
public void setCity(City city) {
this.city = city;
}
public City getCity() {
return city;
}
this.city = city;
}
public City getCity() {
return city;
}
public void setForecast(List<Forecast> forecast) {
this.forecast = forecast;
}
public List<Forecast> getForecast() {
return forecast;
}
public Aqi getAqi() {
return aqi;
}
public void setAqi(Aqi aqi) {
this.aqi = aqi;
}
this.forecast = forecast;
}
public List<Forecast> getForecast() {
return forecast;
}
public Aqi getAqi() {
return aqi;
}
public void setAqi(Aqi aqi) {
this.aqi = aqi;
}
}
......@@ -4,7 +4,7 @@ import java.util.Date;
public class Forecast {
private String conditionDay;
private String conditionDay;
private String conditionIdDay;
private String conditionIdNight;
private String conditionNight;
......@@ -16,89 +16,102 @@ public class Forecast {
private String windDirNight;
private String windLevelDay;
private String windLevelNight;
public void setConditionDay(String conditionDay) {
this.conditionDay = conditionDay;
}
public String getConditionDay() {
return conditionDay;
}
this.conditionDay = conditionDay;
}
public String getConditionDay() {
return conditionDay;
}
public void setConditionIdDay(String conditionIdDay) {
this.conditionIdDay = conditionIdDay;
}
public String getConditionIdDay() {
return conditionIdDay;
}
this.conditionIdDay = conditionIdDay;
}
public String getConditionIdDay() {
return conditionIdDay;
}
public void setConditionIdNight(String conditionIdNight) {
this.conditionIdNight = conditionIdNight;
}
public String getConditionIdNight() {
return conditionIdNight;
}
this.conditionIdNight = conditionIdNight;
}
public String getConditionIdNight() {
return conditionIdNight;
}
public void setConditionNight(String conditionNight) {
this.conditionNight = conditionNight;
}
public String getConditionNight() {
return conditionNight;
}
this.conditionNight = conditionNight;
}
public String getConditionNight() {
return conditionNight;
}
public void setPredictDate(Date predictDate) {
this.predictDate = predictDate;
}
public Date getPredictDate() {
return predictDate;
}
this.predictDate = predictDate;
}
public Date getPredictDate() {
return predictDate;
}
public void setTempDay(String tempDay) {
this.tempDay = tempDay;
}
public String getTempDay() {
return tempDay;
}
this.tempDay = tempDay;
}
public String getTempDay() {
return tempDay;
}
public void setTempNight(String tempNight) {
this.tempNight = tempNight;
}
public String getTempNight() {
return tempNight;
}
this.tempNight = tempNight;
}
public String getTempNight() {
return tempNight;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
public Date getUpdatetime() {
return updatetime;
}
this.updatetime = updatetime;
}
public Date getUpdatetime() {
return updatetime;
}
public void setWindDirDay(String windDirDay) {
this.windDirDay = windDirDay;
}
public String getWindDirDay() {
return windDirDay;
}
this.windDirDay = windDirDay;
}
public String getWindDirDay() {
return windDirDay;
}
public void setWindDirNight(String windDirNight) {
this.windDirNight = windDirNight;
}
public String getWindDirNight() {
return windDirNight;
}
this.windDirNight = windDirNight;
}
public String getWindDirNight() {
return windDirNight;
}
public void setWindLevelDay(String windLevelDay) {
this.windLevelDay = windLevelDay;
}
public String getWindLevelDay() {
return windLevelDay;
}
this.windLevelDay = windLevelDay;
}
public String getWindLevelDay() {
return windLevelDay;
}
public void setWindLevelNight(String windLevelNight) {
this.windLevelNight = windLevelNight;
}
public String getWindLevelNight() {
return windLevelNight;
}
this.windLevelNight = windLevelNight;
}
public String getWindLevelNight() {
return windLevelNight;
}
}
......@@ -2,19 +2,22 @@ package com.viontech.model;
public class Rc {
private int c;
private int c;
private String p;
public void setC(int c) {
this.c = c;
}
public int getC() {
return c;
}
this.c = c;
}
public int getC() {
return c;
}
public void setP(String p) {
this.p = p;
}
public String getP() {
return p;
}
this.p = p;
}
public String getP() {
return p;
}
}
......@@ -2,86 +2,95 @@ package com.viontech.model;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
public class SimpleWeather {
private int province_id;
private int city_id;
private int type;
private Date data_date;
private String ltemp;
private String htemp;
//private int pm25;
private String aqi;
public String getFengli() {
return fengli;
}
public void setFengli(String fengli) {
this.fengli = fengli;
}
private String fengli;
public String getFengxiang() {
return fengxiang;
}
public void setFengxiang(String fengxiang) {
this.fengxiang = fengxiang;
}
private String fengxiang;
public int getProvince_id() {
return province_id;
}
public void setProvince_id(int province_id) {
this.province_id = province_id;
}
public int getCity_id() {
return city_id;
}
public void setCity_id(int city_id) {
this.city_id = city_id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Date getData_date() {
return data_date;
}
public void setData_date(Date data_date) {
this.data_date = data_date;
}
public String getLtemp() {
return ltemp;
}
public void setLtemp(String ltemp) {
this.ltemp = ltemp;
}
public String getHtemp() {
return htemp;
}
public void setHtemp(String htemp) {
this.htemp = htemp;
}
public String getAqi() {
return aqi;
}
public void setAqi(String aqi) {
this.aqi = aqi;
}
private int province_id;
private int city_id;
private int type;
private Date data_date;
private String ltemp;
private String htemp;
//private int pm25;
private String aqi;
public String getFengli() {
return fengli;
}
public void setFengli(String fengli) {
this.fengli = fengli;
}
private String fengli;
public String getFengxiang() {
return fengxiang;
}
public void setFengxiang(String fengxiang) {
this.fengxiang = fengxiang;
}
private String fengxiang;
public int getProvince_id() {
return province_id;
}
public void setProvince_id(int province_id) {
this.province_id = province_id;
}
public int getCity_id() {
return city_id;
}
public void setCity_id(int city_id) {
this.city_id = city_id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Date getData_date() {
return data_date;
}
public void setData_date(Date data_date) {
this.data_date = data_date;
}
public String getLtemp() {
return ltemp;
}
public void setLtemp(String ltemp) {
this.ltemp = ltemp;
}
public String getHtemp() {
return htemp;
}
public void setHtemp(String htemp) {
this.htemp = htemp;
}
public String getAqi() {
return aqi;
}
public void setAqi(String aqi) {
this.aqi = aqi;
}
}
......@@ -2,35 +2,40 @@ package com.viontech.model;
public class WeatherMessage {
private int code;
private int code;
private Data data;
private String msg;
private Rc rc;
public void setCode(int code) {
this.code = code;
}
public int getCode() {
return code;
}
this.code = code;
}
public int getCode() {
return code;
}
public void setData(Data data) {
this.data = data;
}
public Data getData() {
return data;
}
this.data = data;
}
public Data getData() {
return data;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getMsg() {
return msg;
}
this.msg = msg;
}
public String getMsg() {
return msg;
}
public void setRc(Rc rc) {
this.rc = rc;
}
public Rc getRc() {
return rc;
}
this.rc = rc;
}
public Rc getRc() {
return rc;
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!