提现必须观看广告激励

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

@@ -97,6 +97,7 @@ public class UniAdCallbackRecordServiceImpl extends ServiceImpl<UniAdCallbackRec
return respData;
}
UserEntity userEntity = userDao.selectById(callBackDTO.getUser_id());
if (userEntity == null) {
callbackRecord.setErrMsg("用户不存在");
@@ -106,16 +107,22 @@ public class UniAdCallbackRecordServiceImpl extends ServiceImpl<UniAdCallbackRec
return respData;
}
CommonInfo info = commonInfoDao.findOne(921);
if (info == null || StrUtil.isBlank(info.getValue())){
callbackRecord.setErrMsg("CommonInfo时长时间未配置");
log.warn(getBaseErrInfo(callbackRecord));
save(callbackRecord);
respData.put("isValid", false);
return respData;
if (!callBackDTO.getExtra().contains("cash")) {
CommonInfo info = commonInfoDao.findOne(921);
if (info == null || StrUtil.isBlank(info.getValue())){
callbackRecord.setErrMsg("CommonInfo时长时间未配置");
log.warn(getBaseErrInfo(callbackRecord));
save(callbackRecord);
respData.put("isValid", false);
return respData;
}
redisService.setFreeWatchTime(callbackRecord.getUserId(), Integer.parseInt(info.getValue()) * 60, true);
}else {
redisService.setCanCashFlag(userEntity.getUserId(), callbackRecord.getId());
}
redisService.setFreeWatchTime(callbackRecord.getUserId(), Integer.parseInt(info.getValue()) * 60, true);
save(callbackRecord);
respData.put("isValid", true);
return respData;