-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5b359c
commit 9153657
Showing
16 changed files
with
351 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* Created by maning on 2017/4/11. | ||
*/ | ||
|
||
@Deprecated | ||
public class CalendarInfoEntity { | ||
|
||
|
||
|
152 changes: 152 additions & 0 deletions
152
app/src/main/java/com/maning/gankmm/bean/rolltools/HolidayBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
package com.maning.gankmm.bean.rolltools; | ||
|
||
/** | ||
* @author : maning | ||
* @date : 2020-10-15 | ||
* @desc : | ||
*/ | ||
public class HolidayBean { | ||
/** | ||
* date : 2018-11-21 | ||
* weekDay : 3 | ||
* yearTips : 戊戌 | ||
* type : 0 | ||
* typeDes : 工作日 | ||
* chineseZodiac : 狗 | ||
* solarTerms : 立冬后 | ||
* avoid : 嫁娶.安葬 | ||
* lunarCalendar : 十月十四 | ||
* suit : 破屋.坏垣.祭祀.余事勿取 | ||
* dayOfYear : 325 | ||
* weekOfYear : 47 | ||
* constellation : 天蝎座 | ||
* indexWorkDayOfMonth : 1 | ||
*/ | ||
|
||
private String date; | ||
private int weekDay; | ||
private String yearTips; | ||
private int type; | ||
private String typeDes; | ||
private String chineseZodiac; | ||
private String solarTerms; | ||
private String avoid; | ||
private String lunarCalendar; | ||
private String suit; | ||
private int dayOfYear; | ||
private int weekOfYear; | ||
private String constellation; | ||
private int indexWorkDayOfMonth; | ||
|
||
public String getDate() { | ||
return date; | ||
} | ||
|
||
public void setDate(String date) { | ||
this.date = date; | ||
} | ||
|
||
public int getWeekDay() { | ||
return weekDay; | ||
} | ||
|
||
public void setWeekDay(int weekDay) { | ||
this.weekDay = weekDay; | ||
} | ||
|
||
public String getYearTips() { | ||
return yearTips; | ||
} | ||
|
||
public void setYearTips(String yearTips) { | ||
this.yearTips = yearTips; | ||
} | ||
|
||
public int getType() { | ||
return type; | ||
} | ||
|
||
public void setType(int type) { | ||
this.type = type; | ||
} | ||
|
||
public String getTypeDes() { | ||
return typeDes; | ||
} | ||
|
||
public void setTypeDes(String typeDes) { | ||
this.typeDes = typeDes; | ||
} | ||
|
||
public String getChineseZodiac() { | ||
return chineseZodiac; | ||
} | ||
|
||
public void setChineseZodiac(String chineseZodiac) { | ||
this.chineseZodiac = chineseZodiac; | ||
} | ||
|
||
public String getSolarTerms() { | ||
return solarTerms; | ||
} | ||
|
||
public void setSolarTerms(String solarTerms) { | ||
this.solarTerms = solarTerms; | ||
} | ||
|
||
public String getAvoid() { | ||
return avoid; | ||
} | ||
|
||
public void setAvoid(String avoid) { | ||
this.avoid = avoid; | ||
} | ||
|
||
public String getLunarCalendar() { | ||
return lunarCalendar; | ||
} | ||
|
||
public void setLunarCalendar(String lunarCalendar) { | ||
this.lunarCalendar = lunarCalendar; | ||
} | ||
|
||
public String getSuit() { | ||
return suit; | ||
} | ||
|
||
public void setSuit(String suit) { | ||
this.suit = suit; | ||
} | ||
|
||
public int getDayOfYear() { | ||
return dayOfYear; | ||
} | ||
|
||
public void setDayOfYear(int dayOfYear) { | ||
this.dayOfYear = dayOfYear; | ||
} | ||
|
||
public int getWeekOfYear() { | ||
return weekOfYear; | ||
} | ||
|
||
public void setWeekOfYear(int weekOfYear) { | ||
this.weekOfYear = weekOfYear; | ||
} | ||
|
||
public String getConstellation() { | ||
return constellation; | ||
} | ||
|
||
public void setConstellation(String constellation) { | ||
this.constellation = constellation; | ||
} | ||
|
||
public int getIndexWorkDayOfMonth() { | ||
return indexWorkDayOfMonth; | ||
} | ||
|
||
public void setIndexWorkDayOfMonth(int indexWorkDayOfMonth) { | ||
this.indexWorkDayOfMonth = indexWorkDayOfMonth; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
app/src/main/java/com/maning/gankmm/bean/rolltools/HolidaySingleResultBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.maning.gankmm.bean.rolltools; | ||
|
||
/** | ||
* @author : maning | ||
* @date : 2020-10-15 | ||
* @desc : | ||
*/ | ||
public class HolidaySingleResultBean extends RollToolsBaseBean { | ||
|
||
/** | ||
* data : {"date":"2018-11-21","weekDay":3,"yearTips":"戊戌","type":0,"typeDes":"工作日","chineseZodiac":"狗","solarTerms":"立冬后","avoid":"嫁娶.安葬","lunarCalendar":"十月十四","suit":"破屋.坏垣.祭祀.余事勿取","dayOfYear":325,"weekOfYear":47,"constellation":"天蝎座","indexWorkDayOfMonth":1} | ||
*/ | ||
|
||
private HolidayBean data; | ||
|
||
public HolidayBean getData() { | ||
return data; | ||
} | ||
|
||
public void setData(HolidayBean data) { | ||
this.data = data; | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
app/src/main/java/com/maning/gankmm/bean/rolltools/RollToolsBaseBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.maning.gankmm.bean.rolltools; | ||
|
||
/** | ||
* @author : maning | ||
* @date : 2020-10-15 | ||
* @desc : | ||
*/ | ||
public class RollToolsBaseBean { | ||
|
||
/** | ||
* code : 1 | ||
* msg : 数据返回成功 | ||
*/ | ||
|
||
private int code; | ||
private String msg; | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public void setCode(int code) { | ||
this.code = code; | ||
} | ||
|
||
public String getMsg() { | ||
return msg; | ||
} | ||
|
||
public void setMsg(String msg) { | ||
this.msg = msg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/maning/gankmm/http/rolltools/APIRolltoolsService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.maning.gankmm.http.rolltools; | ||
|
||
import com.maning.gankmm.bean.rolltools.HolidaySingleResultBean; | ||
|
||
import retrofit2.Call; | ||
import retrofit2.http.GET; | ||
import retrofit2.http.Headers; | ||
import retrofit2.http.Path; | ||
|
||
|
||
/** | ||
* 接口调用的工具类 | ||
*/ | ||
public interface APIRolltoolsService { | ||
|
||
|
||
@Headers({ | ||
"app_id:olkgphoyitdqikvi", | ||
"app_secret:SFdTdFB5aGVoamlXU2dZblpPZTRjQT09" | ||
}) | ||
@GET("holiday/single/{date}") | ||
Call<HolidaySingleResultBean> getHolidaySingle( | ||
@Path("date") String date | ||
); | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/maning/gankmm/http/rolltools/RolltoolsApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.maning.gankmm.http.rolltools; | ||
|
||
import com.maning.gankmm.bean.rolltools.HolidaySingleResultBean; | ||
import com.maning.gankmm.http.BuildApi; | ||
import com.maning.gankmm.http.callback.CommonHttpCallback; | ||
|
||
/** | ||
* @author : maning | ||
* @date : 2020-09-29 | ||
* @desc : | ||
*/ | ||
public class RolltoolsApi { | ||
|
||
|
||
/** | ||
* 获取指定日期的节假日及万年历信息 | ||
* | ||
* @param date yyyyMMdd | ||
*/ | ||
public static void getHolidaySingle(String date, CommonHttpCallback<HolidaySingleResultBean> httpCallback) { | ||
BuildApi.getRooltoolsAPIService().getHolidaySingle(date).enqueue(httpCallback); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.