热游vipLevel 每月1-7号,16-22号 直接返回v0

This commit is contained in:
tianfeng 2026-03-17 16:30:10 +08:00
parent c127b6c8fc
commit 445fa1e7f6

View File

@ -141,8 +141,10 @@ public class HotGameServiceImpl implements HotGameService {
public Integer getVipLevel(Long userId) {
LocalDateTime now = LocalDateTime.now();
LocalDateTime endTime = LocalDateTime.parse("2026-02-23 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
if (now.isBefore(endTime)) {
// 新增检查是否为每月的 1-7号 16-22号
int dayOfMonth = now.getDayOfMonth();
if ((dayOfMonth >= 1 && dayOfMonth <= 7) || (dayOfMonth >= 16 && dayOfMonth <= 22)) {
return 0;
}