优化
This commit is contained in:
@@ -73,7 +73,11 @@ public class DailyplanServiceImpl implements DailyplanService {
|
||||
String plan_finish_date = jo.getString("plan_finish_date");
|
||||
Date date2 = DateUtil.parse(plan_finish_date);
|
||||
long days = (int) DateUtil.between(date2,date, DateUnit.DAY);
|
||||
jo.put("day_num",days);
|
||||
if(date2.getTime() >= date.getTime()){
|
||||
jo.put("day_num",days);
|
||||
}else{
|
||||
jo.put("day_num",-days);
|
||||
}
|
||||
ja.add(jo);
|
||||
}
|
||||
jret.put("content",ja);
|
||||
@@ -108,7 +112,11 @@ public class DailyplanServiceImpl implements DailyplanService {
|
||||
String plan_finish_date = jo.getString("plan_finish_date");
|
||||
Date date2 = DateUtil.parse(plan_finish_date);
|
||||
long days = (int) DateUtil.between(date2,date, DateUnit.DAY);
|
||||
jo.put("day_num",days);
|
||||
if(date2.getTime() >= date.getTime()){
|
||||
jo.put("day_num",days);
|
||||
}else{
|
||||
jo.put("day_num",-days);
|
||||
}
|
||||
ja.add(jo);
|
||||
}
|
||||
return ja;
|
||||
|
||||
Reference in New Issue
Block a user