|
@@ -59,14 +59,14 @@ class PlayerController extends AbstractController
|
|
$today_record = RedisUtil::getInstance(RedisKeyEnum::VOTE_RECORD.date('Y-m-d').':'.$user_id)->get();
|
|
$today_record = RedisUtil::getInstance(RedisKeyEnum::VOTE_RECORD.date('Y-m-d').':'.$user_id)->get();
|
|
//今天,用户答对的次数
|
|
//今天,用户答对的次数
|
|
$question_vote = RedisUtil::getInstance(RedisKeyEnum::EAXM_RIGHT.date('Y-m-d').':'.$user_id)->get();
|
|
$question_vote = RedisUtil::getInstance(RedisKeyEnum::EAXM_RIGHT.date('Y-m-d').':'.$user_id)->get();
|
|
- $question_vote = intval(bcmul((string)$question_vote,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
|
|
|
|
|
|
+ $question_vote = intval(bcmul((string)$question_vote,(string)site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
|
|
//今天,用户答题的次数
|
|
//今天,用户答题的次数
|
|
$today_question = RedisUtil::getInstance(RedisKeyEnum::EAXM_TIMES.date('Y-m-d').':'.$user_id)->get();
|
|
$today_question = RedisUtil::getInstance(RedisKeyEnum::EAXM_TIMES.date('Y-m-d').':'.$user_id)->get();
|
|
//今天,免费的的票
|
|
//今天,免费的的票
|
|
$gift_votes = site('gift_votes_user_eday');
|
|
$gift_votes = site('gift_votes_user_eday');
|
|
//今天,免费的答题次数
|
|
//今天,免费的答题次数
|
|
$exam_times = site('exam_times_user_eday');
|
|
$exam_times = site('exam_times_user_eday');
|
|
-
|
|
|
|
|
|
+dd($gift_votes,$question_vote,$today_record);return;
|
|
//免费票 + 答对票数 - 已投票次数 < vote
|
|
//免费票 + 答对票数 - 已投票次数 < vote
|
|
$times = $gift_votes + $question_vote - $today_record;
|
|
$times = $gift_votes + $question_vote - $today_record;
|
|
if($times < 0){$times = 0;}
|
|
if($times < 0){$times = 0;}
|