invitecode.php 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * 分享邀请码相关需求
  4. */
  5. defined('IN_WEB') or die('Include Error!');
  6. class ModelInvitecode{
  7. /**
  8. * 获取邀请人数
  9. * @param $tempKeyDate
  10. * @return mixed
  11. * newplayerFrom($type = 1, $device = 1)
  12. */
  13. public function getInviteNum($tempKeyDate)
  14. {
  15. $tempKeyFBAnd = okeys::newplayerFromDate(1, 1, $tempKeyDate);//FB 安卓
  16. $fbAndNum = oo::commonOprRedis('common')->get($tempKeyFBAnd);
  17. $tempKeyInvAnd = okeys::newplayerFromDate(2, 1, $tempKeyDate);//邀请码 安卓
  18. $invAndNum = oo::commonOprRedis('common')->get($tempKeyInvAnd);
  19. $tempKeyFBIos = okeys::newplayerFromDate(1, 2, $tempKeyDate);//FB IOS
  20. $fbIosNum = oo::commonOprRedis('common')->get($tempKeyFBIos);
  21. $tempKeyInvIos = okeys::newplayerFromDate(2, 2, $tempKeyDate);//邀请码 IOS
  22. $invIosNum = oo::commonOprRedis('common')->get($tempKeyInvIos);
  23. $data['fbAndNum'] = intval($fbAndNum);
  24. $data['invAndNum'] = intval($invAndNum);
  25. $data['fbIosNum'] = intval($fbIosNum);
  26. $data['invIosNum'] = intval($invIosNum);
  27. return $data;
  28. }
  29. }