|
|
@ -70,14 +70,35 @@ public class AApiAppletHhrWorkOutServiceImpl implements IAApiAppletHhrWorkOutSer |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
map.put("info",appUsers); //用户信息 |
|
|
|
|
|
|
|
// 计算合伙人入住天数 |
|
|
|
long partnerDays = 0; |
|
|
|
// 计算合伙人入住时间 |
|
|
|
String partnerTime = "0分钟"; |
|
|
|
if (appUsers.getCreateTime() != null) { |
|
|
|
LocalDateTime createTime = appUsers.getCreateTime(); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
partnerDays = ChronoUnit.DAYS.between(createTime, now); |
|
|
|
long days = ChronoUnit.DAYS.between(createTime, now); |
|
|
|
|
|
|
|
if (days > 0) { |
|
|
|
partnerTime = days + "天"; |
|
|
|
} else { |
|
|
|
long hours = ChronoUnit.HOURS.between(createTime, now); |
|
|
|
if (hours > 0) { |
|
|
|
partnerTime = hours + "小时"; |
|
|
|
} else { |
|
|
|
long minutes = ChronoUnit.MINUTES.between(createTime, now); |
|
|
|
if (minutes > 0) { |
|
|
|
partnerTime = minutes + "分钟"; |
|
|
|
} else { |
|
|
|
long seconds = ChronoUnit.SECONDS.between(createTime, now); |
|
|
|
if (seconds > 0) { |
|
|
|
partnerTime = seconds + "秒"; |
|
|
|
} else { |
|
|
|
partnerTime = "刚刚加入"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("partner_day", partnerDays + "天"); //合伙人加入天数 |
|
|
|
map.put("partner_day", partnerTime); //合伙人加入时间 |
|
|
|
|
|
|
|
AppletConfig petPaymentHh = appletConfigService.selectAppletConfigByClassAndNum("pet_payment_hh", appUsers.getUserHhRole()); |
|
|
|
|
|
|
|