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;
......
......@@ -15,6 +15,7 @@ public class City {
public Integer getProvinceId() {
return provinceId;
}
public void setProvinceId(Integer provinceId) {
this.provinceId = provinceId;
}
......@@ -22,6 +23,7 @@ public class City {
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
......@@ -29,6 +31,7 @@ public class City {
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public Integer getCityId() {
return cityId;
}
......@@ -36,6 +39,7 @@ public class City {
public void setCounname(String counname) {
this.counname = counname;
}
public String getCounname() {
return counname;
}
......@@ -43,6 +47,7 @@ public class City {
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
......@@ -50,6 +55,7 @@ public class City {
public void setPname(String pname) {
this.pname = pname;
}
public String getPname() {
return pname;
}
......@@ -57,12 +63,15 @@ public class City {
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;
}
......
......@@ -7,9 +7,11 @@ public class Data {
private Aqi aqi;
private City city;
private List<Forecast> forecast;
public void setCity(City city) {
this.city = city;
}
public City getCity() {
return city;
}
......@@ -17,12 +19,15 @@ public class Data {
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;
}
......
......@@ -16,9 +16,11 @@ 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;
}
......@@ -26,6 +28,7 @@ public class Forecast {
public void setConditionIdDay(String conditionIdDay) {
this.conditionIdDay = conditionIdDay;
}
public String getConditionIdDay() {
return conditionIdDay;
}
......@@ -33,6 +36,7 @@ public class Forecast {
public void setConditionIdNight(String conditionIdNight) {
this.conditionIdNight = conditionIdNight;
}
public String getConditionIdNight() {
return conditionIdNight;
}
......@@ -40,6 +44,7 @@ public class Forecast {
public void setConditionNight(String conditionNight) {
this.conditionNight = conditionNight;
}
public String getConditionNight() {
return conditionNight;
}
......@@ -47,6 +52,7 @@ public class Forecast {
public void setPredictDate(Date predictDate) {
this.predictDate = predictDate;
}
public Date getPredictDate() {
return predictDate;
}
......@@ -54,6 +60,7 @@ public class Forecast {
public void setTempDay(String tempDay) {
this.tempDay = tempDay;
}
public String getTempDay() {
return tempDay;
}
......@@ -61,6 +68,7 @@ public class Forecast {
public void setTempNight(String tempNight) {
this.tempNight = tempNight;
}
public String getTempNight() {
return tempNight;
}
......@@ -68,6 +76,7 @@ public class Forecast {
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
public Date getUpdatetime() {
return updatetime;
}
......@@ -75,6 +84,7 @@ public class Forecast {
public void setWindDirDay(String windDirDay) {
this.windDirDay = windDirDay;
}
public String getWindDirDay() {
return windDirDay;
}
......@@ -82,6 +92,7 @@ public class Forecast {
public void setWindDirNight(String windDirNight) {
this.windDirNight = windDirNight;
}
public String getWindDirNight() {
return windDirNight;
}
......@@ -89,6 +100,7 @@ public class Forecast {
public void setWindLevelDay(String windLevelDay) {
this.windLevelDay = windLevelDay;
}
public String getWindLevelDay() {
return windLevelDay;
}
......@@ -96,6 +108,7 @@ public class Forecast {
public void setWindLevelNight(String windLevelNight) {
this.windLevelNight = windLevelNight;
}
public String getWindLevelNight() {
return windLevelNight;
}
......
......@@ -4,9 +4,11 @@ public class Rc {
private int c;
private String p;
public void setC(int c) {
this.c = c;
}
public int getC() {
return c;
}
......@@ -14,6 +16,7 @@ public class Rc {
public void setP(String p) {
this.p = p;
}
public String getP() {
return p;
}
......
......@@ -2,8 +2,6 @@ package com.viontech.model;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
public class SimpleWeather {
......@@ -41,47 +39,58 @@ public class SimpleWeather {
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;
}
}
......@@ -6,9 +6,11 @@ public class WeatherMessage {
private Data data;
private String msg;
private Rc rc;
public void setCode(int code) {
this.code = code;
}
public int getCode() {
return code;
}
......@@ -16,6 +18,7 @@ public class WeatherMessage {
public void setData(Data data) {
this.data = data;
}
public Data getData() {
return data;
}
......@@ -23,6 +26,7 @@ public class WeatherMessage {
public void setMsg(String msg) {
this.msg = msg;
}
public String getMsg() {
return msg;
}
......@@ -30,6 +34,7 @@ public class WeatherMessage {
public void setRc(Rc 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!