|
|
@@ -334,8 +334,15 @@ public class TenantServiceImpl implements TenantService { |
|
|
|
if (ObjectUtil.isNotNull(tenantItem)) { |
|
|
|
//获取有效期等 |
|
|
|
vo.setEffectiveDate(DateUtil.formatDate(tenantItem.getBeginTime()) + CommonConstant.TILDE + DateUtil.formatDate(tenantItem.getEndTime())); |
|
|
|
Long day = null; |
|
|
|
//超过有效期则为flase |
|
|
|
boolean flag = tenantItem.getBeginTime().after(DateUtil.date()); |
|
|
|
if (!flag) { |
|
|
|
day = DateUtil.between(DateUtil.date(), tenantItem.getEndTime(), DateUnit.DAY); |
|
|
|
} else { |
|
|
|
day = DateUtil.between(tenantItem.getBeginTime(), tenantItem.getEndTime(), DateUnit.DAY); |
|
|
|
} |
|
|
|
//获取剩余天数 |
|
|
|
long day = DateUtil.between(DateUtil.date(), tenantItem.getEndTime(), DateUnit.DAY); |
|
|
|
vo.setRemainDays(day); |
|
|
|
} |
|
|
|
//此处userId = tenantId 效果一致 |