Commit 851fe5ab by 杨树贤

给予初始值,修复null的问题

parent 12724897
Showing with 6 additions and 0 deletions
......@@ -100,6 +100,12 @@ class Invite extends Model
{
$redis = new RedisModel();
$info = json_decode($redis->hget('ic_welfare_invites', $userId), true);
if (!$info) {
$info = [
'amount' => 0,
'count' => 0,
];
}
return $info;
}
......
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