<?php
/**
 * 分享邀请码相关需求
 */
defined('IN_WEB') or die('Include Error!');
class ModelInvitecode{
    /**
     * 获取邀请人数
     * @param $tempKeyDate
     * @return mixed
     * newplayerFrom($type = 1, $device = 1)
     */
    public function getInviteNum($tempKeyDate)
    {
        $tempKeyFBAnd 	= okeys::newplayerFromDate(1, 1, $tempKeyDate);//FB 安卓
        $fbAndNum = oo::commonOprRedis('common')->get($tempKeyFBAnd);
        $tempKeyInvAnd 	= okeys::newplayerFromDate(2, 1, $tempKeyDate);//邀请码 安卓
        $invAndNum = oo::commonOprRedis('common')->get($tempKeyInvAnd);
        $tempKeyFBIos = okeys::newplayerFromDate(1, 2, $tempKeyDate);//FB IOS
        $fbIosNum = oo::commonOprRedis('common')->get($tempKeyFBIos);
        $tempKeyInvIos = okeys::newplayerFromDate(2, 2, $tempKeyDate);//邀请码 IOS
        $invIosNum = oo::commonOprRedis('common')->get($tempKeyInvIos);
        $data['fbAndNum'] = intval($fbAndNum);
        $data['invAndNum'] = intval($invAndNum);
        $data['fbIosNum'] = intval($fbIosNum);
        $data['invIosNum'] = intval($invIosNum);
        return $data;
    }

}