热游vipLevel 每月1-7号,16-22号 直接返回v0
This commit is contained in:
parent
c127b6c8fc
commit
445fa1e7f6
@ -141,8 +141,10 @@ public class HotGameServiceImpl implements HotGameService {
|
|||||||
|
|
||||||
public Integer getVipLevel(Long userId) {
|
public Integer getVipLevel(Long userId) {
|
||||||
LocalDateTime now = LocalDateTime.now();
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user