Skip to content

Commit

Permalink
天气详情页面添加生活指数
Browse files Browse the repository at this point in the history
  • Loading branch information
maning0303 committed Oct 15, 2020
1 parent 1f9b424 commit b5b359c
Show file tree
Hide file tree
Showing 27 changed files with 815 additions and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Created by maning on 2017/4/1.
*/

@Deprecated
public class WeatherBeseEntity implements Serializable{


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package com.maning.gankmm.bean.weather;

import java.io.Serializable;

/**
* @author : maning
* @date : 2020-10-14
* @desc : 自己组装使用的天气数据
*/
public class WeatherBean {
public class WeatherInfoBean implements Serializable {


private static final long serialVersionUID = 8274082861209944804L;
//天气
private String weather_desc;
//温度
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.maning.gankmm.bean.weather;
package com.maning.gankmm.bean.weather.caiyun;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.maning.gankmm.bean.weather;
package com.maning.gankmm.bean.weather.caiyun;

import com.google.gson.annotations.SerializedName;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.maning.gankmm.bean.weather;
package com.maning.gankmm.bean.weather.caiyun;

/**
* @author : maning
Expand Down Expand Up @@ -69,7 +69,6 @@ public static class RealtimeEntity {
private WindEntity wind;
private double pressure;
private double apparent_temperature;
private PrecipitationEntity precipitation;
private AirQualityEntity air_quality;
private LifeIndexEntity life_index;

Expand Down Expand Up @@ -153,14 +152,6 @@ public void setApparent_temperature(double apparent_temperature) {
this.apparent_temperature = apparent_temperature;
}

public PrecipitationEntity getPrecipitation() {
return precipitation;
}

public void setPrecipitation(PrecipitationEntity precipitation) {
this.precipitation = precipitation;
}

public AirQualityEntity getAir_quality() {
return air_quality;
}
Expand Down Expand Up @@ -203,58 +194,6 @@ public void setDirection(double direction) {
}
}

public static class PrecipitationEntity {
/**
* local : {"status":"ok","datasource":"gfs","intensity":0}
*/

private LocalEntity local;

public LocalEntity getLocal() {
return local;
}

public void setLocal(LocalEntity local) {
this.local = local;
}

public static class LocalEntity {
/**
* status : ok
* datasource : gfs
* intensity : 0
*/

private String status;
private String datasource;
private int intensity;

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public String getDatasource() {
return datasource;
}

public void setDatasource(String datasource) {
this.datasource = datasource;
}

public int getIntensity() {
return intensity;
}

public void setIntensity(int intensity) {
this.intensity = intensity;
}
}
}

public static class AirQualityEntity {
/**
* pm25 : 6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.maning.gankmm.bean.weather;
package com.maning.gankmm.bean.weather.zhixin;

/**
* @author : maning
* @date : 2020-10-14
* @desc :
*/
public class WeatherBaseBean {
public class ZhixinBaseBean {

private String status;
private String status_code;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
package com.maning.gankmm.bean.weather.zhixin;

import java.util.List;

/**
* @author : maning
* @date : 2020-10-15
* @desc : 生活指数
*/
public class ZhixinLifeSuggestionResultBean extends ZhixinBaseBean {


private List<ResultsEntity> results;

public List<ResultsEntity> getResults() {
return results;
}

public void setResults(List<ResultsEntity> results) {
this.results = results;
}

public static class ResultsEntity {
/**
* location : {"id":"WTW3SJ5ZBJUY","name":"上海","country":"CN","path":"上海,上海,中国","timezone":"Asia/Shanghai","timezone_offset":"+08:00"}
* suggestion : {"car_washing":{"brief":"不宜","details":""},"dressing":{"brief":"较舒适","details":""},"flu":{"brief":"易发","details":""},"sport":{"brief":"较不宜","details":""},"travel":{"brief":"适宜","details":""},"uv":{"brief":"最弱","details":""}}
* last_update : 2020-10-15T08:32:45+08:00
*/

private LocationEntity location;
private ZhixinSuggestionEntity suggestion;
private String last_update;

public LocationEntity getLocation() {
return location;
}

public void setLocation(LocationEntity location) {
this.location = location;
}

public ZhixinSuggestionEntity getSuggestion() {
return suggestion;
}

public void setSuggestion(ZhixinSuggestionEntity suggestion) {
this.suggestion = suggestion;
}

public String getLast_update() {
return last_update;
}

public void setLast_update(String last_update) {
this.last_update = last_update;
}

public static class LocationEntity {
/**
* id : WTW3SJ5ZBJUY
* name : 上海
* country : CN
* path : 上海,上海,中国
* timezone : Asia/Shanghai
* timezone_offset : +08:00
*/

private String id;
private String name;
private String country;
private String path;
private String timezone;
private String timezone_offset;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getCountry() {
return country;
}

public void setCountry(String country) {
this.country = country;
}

public String getPath() {
return path;
}

public void setPath(String path) {
this.path = path;
}

public String getTimezone() {
return timezone;
}

public void setTimezone(String timezone) {
this.timezone = timezone;
}

public String getTimezone_offset() {
return timezone_offset;
}

public void setTimezone_offset(String timezone_offset) {
this.timezone_offset = timezone_offset;
}
}

}
}
Loading

0 comments on commit b5b359c

Please sign in to comment.