Commit c13fb89d by 杨树贤

修复存到redis的金额不是浮点数的问题

parent 5d5627ee
Showing with 1 additions and 1 deletions
......@@ -65,7 +65,7 @@ class IntegralBillTask extends Task
$redis = new RedisModel();
$user = json_decode($redis->hget('ic_user', $userId), true);
$data = (array)$userIntegral->getUserIntegral($userId);
$user['integral'] = $data['integral'] + $amount;
$user['integral'] = number_format($data['integral'] + $amount, 2);
$result = $redis->hset('ic_user', $userId, json_encode($user));
//还要写进user_integrals数据库
if ($result !== false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment