提现必须观看广告激励

This commit is contained in:
张松
2025-01-03 10:23:42 +08:00
parent c9b9bb1a58
commit 6ab171aa28
6 changed files with 49 additions and 9 deletions

View File

@@ -27,4 +27,7 @@ public interface RedisService {
int getCourseWeekPayCount(long courseId);
void setCanCashFlag(Long userId, Long id);
boolean isCanCash(Long userId);
}

View File

@@ -329,4 +329,17 @@ public class RedisServiceImpl implements RedisService {
redisUtils.set(key, i, -1);
return i;
}
@Override
public void setCanCashFlag(Long userId, Long id) {
String key = "cash:canCash:" + userId;
redisUtils.set(key, id, 30);
}
@Override
public boolean isCanCash(Long userId) {
String key = "cash:canCash:" + userId;
String s = redisUtils.get(key);
return StrUtil.isNotBlank(s);
}
}