lizhen_gitee 2 dagar sedan
förälder
incheckning
acfc1959b8

+ 1 - 1
app/Controller/Api/v1/PlayerController.php

@@ -59,7 +59,7 @@ class PlayerController extends AbstractController
         $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  = intval(bcmul($question_vote,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
+        $question_vote  = intval(bcmul((string)$question_vote,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
         //今天,用户答题的次数
         $today_question = RedisUtil::getInstance(RedisKeyEnum::EAXM_TIMES.date('Y-m-d').':'.$user_id)->get();
         //今天,免费的的票

+ 3 - 3
app/Controller/Api/v1/QuestionController.php

@@ -159,14 +159,14 @@ class QuestionController extends AbstractController
         }
 
         //答题日志
-        $right_score = intval(bcmul($is_right_number,site('question_right_getscore'),0));//乘以基数,也就是答题获得的分数
+        $right_score = intval(bcmul((string)$is_right_number,site('question_right_getscore'),0));//乘以基数,也就是答题获得的分数
         $this->service->questionPush(['log_data' => $log_data, 'is_right_number' => $right_score, 'bind_jigou_id' => $user['bind_jigou_id']], 0);
         //给机构加分
 
 
         //返回正确了几道题,剩余答题次数
-        $right_vote    = intval(bcmul($is_right_number,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
-        $question_vote = intval(bcmul($exam_times_user_eday,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
+        $right_vote    = intval(bcmul((string)$is_right_number,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
+        $question_vote = intval(bcmul((string)$exam_times_user_eday,site('question_right_getvotenum'),0));//乘以基数,也就是答题获得的票数
         $result = [
             'remark' => '答对'.$is_right_number.'题,获得'.$right_vote.'次投票次数,答题最多可获得'.$question_vote.'次投票机会',
             'submit_number'=> count($user_questions),