@@ -337,11 +337,15 @@ public class TenantServiceImpl implements TenantService { | |||
Long day = null; | |||
//超过有效期则为flase | |||
boolean flag = tenantItem.getBeginTime().after(DateUtil.date()); | |||
boolean flag2 = tenantItem.getEndTime().after(DateUtil.date()); | |||
if (!flag) { | |||
day = DateUtil.between(DateUtil.date(), tenantItem.getEndTime(), DateUnit.DAY); | |||
} else { | |||
day = DateUtil.between(tenantItem.getBeginTime(), tenantItem.getEndTime(), DateUnit.DAY); | |||
} | |||
if (!flag2) { | |||
day = 0L; | |||
} | |||
//获取剩余天数 | |||
vo.setRemainDays(day); | |||
} |