Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
胡立强
/
VVAS-Weather
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cf921cf7
authored
Aug 04, 2021
by
HlQ
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
格式化代码
1 parent
1ba251dd
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
10 deletions
src/main/java/com/viontech/controller/WeatherController.java
src/main/java/com/viontech/model/Aqi.java
src/main/java/com/viontech/model/City.java
src/main/java/com/viontech/model/Data.java
src/main/java/com/viontech/model/Forecast.java
src/main/java/com/viontech/model/Rc.java
src/main/java/com/viontech/model/SimpleWeather.java
src/main/java/com/viontech/model/WeatherMessage.java
src/main/java/com/viontech/controller/WeatherController.java
View file @
cf921cf
package
com
.
viontech
.
controller
;
package
com
.
viontech
.
controller
;
import
com.viontech.service.impl.WeatherService
;
import
com.viontech.service.impl.WeatherService
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* @author HlQ
* @author HlQ
...
...
src/main/java/com/viontech/model/Aqi.java
View file @
cf921cf
...
@@ -22,8 +22,8 @@ public class Aqi {
...
@@ -22,8 +22,8 @@ public class Aqi {
}
}
public
String
getValue
()
{
public
String
getValue
()
{
if
(
value
==
null
)
{
if
(
value
==
null
)
{
value
=
"0"
;
value
=
"0"
;
}
}
return
value
;
return
value
;
}
}
...
@@ -97,7 +97,6 @@ public class Aqi {
...
@@ -97,7 +97,6 @@ public class Aqi {
}
}
// private String cityName;
// private String cityName;
// private String pubtime;
// private String pubtime;
// private String value;
// private String value;
...
...
src/main/java/com/viontech/model/City.java
View file @
cf921cf
...
@@ -15,6 +15,7 @@ public class City {
...
@@ -15,6 +15,7 @@ public class City {
public
Integer
getProvinceId
()
{
public
Integer
getProvinceId
()
{
return
provinceId
;
return
provinceId
;
}
}
public
void
setProvinceId
(
Integer
provinceId
)
{
public
void
setProvinceId
(
Integer
provinceId
)
{
this
.
provinceId
=
provinceId
;
this
.
provinceId
=
provinceId
;
}
}
...
@@ -22,6 +23,7 @@ public class City {
...
@@ -22,6 +23,7 @@ public class City {
public
String
getCityName
()
{
public
String
getCityName
()
{
return
cityName
;
return
cityName
;
}
}
public
void
setCityName
(
String
cityName
)
{
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
this
.
cityName
=
cityName
;
}
}
...
@@ -29,6 +31,7 @@ public class City {
...
@@ -29,6 +31,7 @@ public class City {
public
void
setCityId
(
Integer
cityId
)
{
public
void
setCityId
(
Integer
cityId
)
{
this
.
cityId
=
cityId
;
this
.
cityId
=
cityId
;
}
}
public
Integer
getCityId
()
{
public
Integer
getCityId
()
{
return
cityId
;
return
cityId
;
}
}
...
@@ -36,6 +39,7 @@ public class City {
...
@@ -36,6 +39,7 @@ public class City {
public
void
setCounname
(
String
counname
)
{
public
void
setCounname
(
String
counname
)
{
this
.
counname
=
counname
;
this
.
counname
=
counname
;
}
}
public
String
getCounname
()
{
public
String
getCounname
()
{
return
counname
;
return
counname
;
}
}
...
@@ -43,6 +47,7 @@ public class City {
...
@@ -43,6 +47,7 @@ public class City {
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
...
@@ -50,6 +55,7 @@ public class City {
...
@@ -50,6 +55,7 @@ public class City {
public
void
setPname
(
String
pname
)
{
public
void
setPname
(
String
pname
)
{
this
.
pname
=
pname
;
this
.
pname
=
pname
;
}
}
public
String
getPname
()
{
public
String
getPname
()
{
return
pname
;
return
pname
;
}
}
...
@@ -57,12 +63,15 @@ public class City {
...
@@ -57,12 +63,15 @@ public class City {
public
void
setTimezone
(
String
timezone
)
{
public
void
setTimezone
(
String
timezone
)
{
this
.
timezone
=
timezone
;
this
.
timezone
=
timezone
;
}
}
public
String
getTimezone
()
{
public
String
getTimezone
()
{
return
timezone
;
return
timezone
;
}
}
public
String
getProvinceName
()
{
public
String
getProvinceName
()
{
return
provinceName
;
return
provinceName
;
}
}
public
void
setProvinceName
(
String
provinceName
)
{
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
this
.
provinceName
=
provinceName
;
}
}
...
...
src/main/java/com/viontech/model/Data.java
View file @
cf921cf
...
@@ -7,9 +7,11 @@ public class Data {
...
@@ -7,9 +7,11 @@ public class Data {
private
Aqi
aqi
;
private
Aqi
aqi
;
private
City
city
;
private
City
city
;
private
List
<
Forecast
>
forecast
;
private
List
<
Forecast
>
forecast
;
public
void
setCity
(
City
city
)
{
public
void
setCity
(
City
city
)
{
this
.
city
=
city
;
this
.
city
=
city
;
}
}
public
City
getCity
()
{
public
City
getCity
()
{
return
city
;
return
city
;
}
}
...
@@ -17,12 +19,15 @@ public class Data {
...
@@ -17,12 +19,15 @@ public class Data {
public
void
setForecast
(
List
<
Forecast
>
forecast
)
{
public
void
setForecast
(
List
<
Forecast
>
forecast
)
{
this
.
forecast
=
forecast
;
this
.
forecast
=
forecast
;
}
}
public
List
<
Forecast
>
getForecast
()
{
public
List
<
Forecast
>
getForecast
()
{
return
forecast
;
return
forecast
;
}
}
public
Aqi
getAqi
()
{
public
Aqi
getAqi
()
{
return
aqi
;
return
aqi
;
}
}
public
void
setAqi
(
Aqi
aqi
)
{
public
void
setAqi
(
Aqi
aqi
)
{
this
.
aqi
=
aqi
;
this
.
aqi
=
aqi
;
}
}
...
...
src/main/java/com/viontech/model/Forecast.java
View file @
cf921cf
...
@@ -16,9 +16,11 @@ public class Forecast {
...
@@ -16,9 +16,11 @@ public class Forecast {
private
String
windDirNight
;
private
String
windDirNight
;
private
String
windLevelDay
;
private
String
windLevelDay
;
private
String
windLevelNight
;
private
String
windLevelNight
;
public
void
setConditionDay
(
String
conditionDay
)
{
public
void
setConditionDay
(
String
conditionDay
)
{
this
.
conditionDay
=
conditionDay
;
this
.
conditionDay
=
conditionDay
;
}
}
public
String
getConditionDay
()
{
public
String
getConditionDay
()
{
return
conditionDay
;
return
conditionDay
;
}
}
...
@@ -26,6 +28,7 @@ public class Forecast {
...
@@ -26,6 +28,7 @@ public class Forecast {
public
void
setConditionIdDay
(
String
conditionIdDay
)
{
public
void
setConditionIdDay
(
String
conditionIdDay
)
{
this
.
conditionIdDay
=
conditionIdDay
;
this
.
conditionIdDay
=
conditionIdDay
;
}
}
public
String
getConditionIdDay
()
{
public
String
getConditionIdDay
()
{
return
conditionIdDay
;
return
conditionIdDay
;
}
}
...
@@ -33,6 +36,7 @@ public class Forecast {
...
@@ -33,6 +36,7 @@ public class Forecast {
public
void
setConditionIdNight
(
String
conditionIdNight
)
{
public
void
setConditionIdNight
(
String
conditionIdNight
)
{
this
.
conditionIdNight
=
conditionIdNight
;
this
.
conditionIdNight
=
conditionIdNight
;
}
}
public
String
getConditionIdNight
()
{
public
String
getConditionIdNight
()
{
return
conditionIdNight
;
return
conditionIdNight
;
}
}
...
@@ -40,6 +44,7 @@ public class Forecast {
...
@@ -40,6 +44,7 @@ public class Forecast {
public
void
setConditionNight
(
String
conditionNight
)
{
public
void
setConditionNight
(
String
conditionNight
)
{
this
.
conditionNight
=
conditionNight
;
this
.
conditionNight
=
conditionNight
;
}
}
public
String
getConditionNight
()
{
public
String
getConditionNight
()
{
return
conditionNight
;
return
conditionNight
;
}
}
...
@@ -47,6 +52,7 @@ public class Forecast {
...
@@ -47,6 +52,7 @@ public class Forecast {
public
void
setPredictDate
(
Date
predictDate
)
{
public
void
setPredictDate
(
Date
predictDate
)
{
this
.
predictDate
=
predictDate
;
this
.
predictDate
=
predictDate
;
}
}
public
Date
getPredictDate
()
{
public
Date
getPredictDate
()
{
return
predictDate
;
return
predictDate
;
}
}
...
@@ -54,6 +60,7 @@ public class Forecast {
...
@@ -54,6 +60,7 @@ public class Forecast {
public
void
setTempDay
(
String
tempDay
)
{
public
void
setTempDay
(
String
tempDay
)
{
this
.
tempDay
=
tempDay
;
this
.
tempDay
=
tempDay
;
}
}
public
String
getTempDay
()
{
public
String
getTempDay
()
{
return
tempDay
;
return
tempDay
;
}
}
...
@@ -61,6 +68,7 @@ public class Forecast {
...
@@ -61,6 +68,7 @@ public class Forecast {
public
void
setTempNight
(
String
tempNight
)
{
public
void
setTempNight
(
String
tempNight
)
{
this
.
tempNight
=
tempNight
;
this
.
tempNight
=
tempNight
;
}
}
public
String
getTempNight
()
{
public
String
getTempNight
()
{
return
tempNight
;
return
tempNight
;
}
}
...
@@ -68,6 +76,7 @@ public class Forecast {
...
@@ -68,6 +76,7 @@ public class Forecast {
public
void
setUpdatetime
(
Date
updatetime
)
{
public
void
setUpdatetime
(
Date
updatetime
)
{
this
.
updatetime
=
updatetime
;
this
.
updatetime
=
updatetime
;
}
}
public
Date
getUpdatetime
()
{
public
Date
getUpdatetime
()
{
return
updatetime
;
return
updatetime
;
}
}
...
@@ -75,6 +84,7 @@ public class Forecast {
...
@@ -75,6 +84,7 @@ public class Forecast {
public
void
setWindDirDay
(
String
windDirDay
)
{
public
void
setWindDirDay
(
String
windDirDay
)
{
this
.
windDirDay
=
windDirDay
;
this
.
windDirDay
=
windDirDay
;
}
}
public
String
getWindDirDay
()
{
public
String
getWindDirDay
()
{
return
windDirDay
;
return
windDirDay
;
}
}
...
@@ -82,6 +92,7 @@ public class Forecast {
...
@@ -82,6 +92,7 @@ public class Forecast {
public
void
setWindDirNight
(
String
windDirNight
)
{
public
void
setWindDirNight
(
String
windDirNight
)
{
this
.
windDirNight
=
windDirNight
;
this
.
windDirNight
=
windDirNight
;
}
}
public
String
getWindDirNight
()
{
public
String
getWindDirNight
()
{
return
windDirNight
;
return
windDirNight
;
}
}
...
@@ -89,6 +100,7 @@ public class Forecast {
...
@@ -89,6 +100,7 @@ public class Forecast {
public
void
setWindLevelDay
(
String
windLevelDay
)
{
public
void
setWindLevelDay
(
String
windLevelDay
)
{
this
.
windLevelDay
=
windLevelDay
;
this
.
windLevelDay
=
windLevelDay
;
}
}
public
String
getWindLevelDay
()
{
public
String
getWindLevelDay
()
{
return
windLevelDay
;
return
windLevelDay
;
}
}
...
@@ -96,6 +108,7 @@ public class Forecast {
...
@@ -96,6 +108,7 @@ public class Forecast {
public
void
setWindLevelNight
(
String
windLevelNight
)
{
public
void
setWindLevelNight
(
String
windLevelNight
)
{
this
.
windLevelNight
=
windLevelNight
;
this
.
windLevelNight
=
windLevelNight
;
}
}
public
String
getWindLevelNight
()
{
public
String
getWindLevelNight
()
{
return
windLevelNight
;
return
windLevelNight
;
}
}
...
...
src/main/java/com/viontech/model/Rc.java
View file @
cf921cf
...
@@ -4,9 +4,11 @@ public class Rc {
...
@@ -4,9 +4,11 @@ public class Rc {
private
int
c
;
private
int
c
;
private
String
p
;
private
String
p
;
public
void
setC
(
int
c
)
{
public
void
setC
(
int
c
)
{
this
.
c
=
c
;
this
.
c
=
c
;
}
}
public
int
getC
()
{
public
int
getC
()
{
return
c
;
return
c
;
}
}
...
@@ -14,6 +16,7 @@ public class Rc {
...
@@ -14,6 +16,7 @@ public class Rc {
public
void
setP
(
String
p
)
{
public
void
setP
(
String
p
)
{
this
.
p
=
p
;
this
.
p
=
p
;
}
}
public
String
getP
()
{
public
String
getP
()
{
return
p
;
return
p
;
}
}
...
...
src/main/java/com/viontech/model/SimpleWeather.java
View file @
cf921cf
...
@@ -2,8 +2,6 @@ package com.viontech.model;
...
@@ -2,8 +2,6 @@ package com.viontech.model;
import
java.util.Date
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
public
class
SimpleWeather
{
public
class
SimpleWeather
{
...
@@ -41,47 +39,58 @@ public class SimpleWeather {
...
@@ -41,47 +39,58 @@ public class SimpleWeather {
public
int
getProvince_id
()
{
public
int
getProvince_id
()
{
return
province_id
;
return
province_id
;
}
}
public
void
setProvince_id
(
int
province_id
)
{
public
void
setProvince_id
(
int
province_id
)
{
this
.
province_id
=
province_id
;
this
.
province_id
=
province_id
;
}
}
public
int
getCity_id
()
{
public
int
getCity_id
()
{
return
city_id
;
return
city_id
;
}
}
public
void
setCity_id
(
int
city_id
)
{
public
void
setCity_id
(
int
city_id
)
{
this
.
city_id
=
city_id
;
this
.
city_id
=
city_id
;
}
}
public
int
getType
()
{
public
int
getType
()
{
return
type
;
return
type
;
}
}
public
void
setType
(
int
type
)
{
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
this
.
type
=
type
;
}
}
public
Date
getData_date
()
{
public
Date
getData_date
()
{
return
data_date
;
return
data_date
;
}
}
public
void
setData_date
(
Date
data_date
)
{
public
void
setData_date
(
Date
data_date
)
{
this
.
data_date
=
data_date
;
this
.
data_date
=
data_date
;
}
}
public
String
getLtemp
()
{
public
String
getLtemp
()
{
return
ltemp
;
return
ltemp
;
}
}
public
void
setLtemp
(
String
ltemp
)
{
public
void
setLtemp
(
String
ltemp
)
{
this
.
ltemp
=
ltemp
;
this
.
ltemp
=
ltemp
;
}
}
public
String
getHtemp
()
{
public
String
getHtemp
()
{
return
htemp
;
return
htemp
;
}
}
public
void
setHtemp
(
String
htemp
)
{
public
void
setHtemp
(
String
htemp
)
{
this
.
htemp
=
htemp
;
this
.
htemp
=
htemp
;
}
}
public
String
getAqi
()
{
public
String
getAqi
()
{
return
aqi
;
return
aqi
;
}
}
public
void
setAqi
(
String
aqi
)
{
public
void
setAqi
(
String
aqi
)
{
this
.
aqi
=
aqi
;
this
.
aqi
=
aqi
;
}
}
}
}
src/main/java/com/viontech/model/WeatherMessage.java
View file @
cf921cf
...
@@ -6,9 +6,11 @@ public class WeatherMessage {
...
@@ -6,9 +6,11 @@ public class WeatherMessage {
private
Data
data
;
private
Data
data
;
private
String
msg
;
private
String
msg
;
private
Rc
rc
;
private
Rc
rc
;
public
void
setCode
(
int
code
)
{
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
public
int
getCode
()
{
public
int
getCode
()
{
return
code
;
return
code
;
}
}
...
@@ -16,6 +18,7 @@ public class WeatherMessage {
...
@@ -16,6 +18,7 @@ public class WeatherMessage {
public
void
setData
(
Data
data
)
{
public
void
setData
(
Data
data
)
{
this
.
data
=
data
;
this
.
data
=
data
;
}
}
public
Data
getData
()
{
public
Data
getData
()
{
return
data
;
return
data
;
}
}
...
@@ -23,6 +26,7 @@ public class WeatherMessage {
...
@@ -23,6 +26,7 @@ public class WeatherMessage {
public
void
setMsg
(
String
msg
)
{
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
this
.
msg
=
msg
;
}
}
public
String
getMsg
()
{
public
String
getMsg
()
{
return
msg
;
return
msg
;
}
}
...
@@ -30,6 +34,7 @@ public class WeatherMessage {
...
@@ -30,6 +34,7 @@ public class WeatherMessage {
public
void
setRc
(
Rc
rc
)
{
public
void
setRc
(
Rc
rc
)
{
this
.
rc
=
rc
;
this
.
rc
=
rc
;
}
}
public
Rc
getRc
()
{
public
Rc
getRc
()
{
return
rc
;
return
rc
;
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment