|
@@ -237,6 +237,9 @@ public class DegreeWrapper {
|
|
|
@ApiModelProperty("考级城市分部")
|
|
|
private List<DegreeCity> degreeCities;
|
|
|
|
|
|
+ @ApiModelProperty("倒计时开始天数")
|
|
|
+ private Integer startDays;
|
|
|
+
|
|
|
|
|
|
public String jsonString() {
|
|
|
return JSON.toJSONString(this);
|
|
@@ -245,6 +248,16 @@ public class DegreeWrapper {
|
|
|
public static StudentDegreeInfo from(String json) {
|
|
|
return JSON.parseObject(json, StudentDegreeInfo.class);
|
|
|
}
|
|
|
+
|
|
|
+ public Integer getStartDays() {
|
|
|
+ if (Objects.nonNull(getStartTime()) && EDegreeStatus.NOT_START == getStatus()) {
|
|
|
+
|
|
|
+ DateTime now = DateTime.now().withHourOfDay(0).withMinuteOfHour(0).withSecondOfMinute(0).withMillisOfSecond(0);
|
|
|
+ // 计算与当前时间相差天数
|
|
|
+ return Days.daysBetween(now, new DateTime(getStartTime())).getDays();
|
|
|
+ }
|
|
|
+ return Optional.ofNullable(startDays).orElse(0);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Data
|