推荐人特权

This commit is contained in:
2026-05-16 18:32:14 +08:00
parent 74ac62b1e0
commit 1b811aa8af
5 changed files with 172 additions and 1 deletions

View File

@@ -64,6 +64,20 @@ public class HxrAdminUserService {
return LocalDateTime.of(d, now.toLocalTime());
}
/**
* VIP 到期时间:以 {@code applyDate} 为起算日顺延 {@code calendarDays} 个自然日,时刻与当前时分秒一致。
*/
public static LocalDateTime computeVipExpireTimePlusCalendarDays(LocalDate applyDate, int calendarDays) {
if (applyDate == null) {
throw new IllegalArgumentException("applyDate不能为空");
}
if (calendarDays < 0) {
throw new IllegalArgumentException("calendarDays不能为负");
}
LocalDateTime now = LocalDateTime.now();
return LocalDateTime.of(applyDate.plusDays(calendarDays), now.toLocalTime());
}
/**
* 调用第三方接口
* 按手机号查询用户列表,返回第一条。