StatisticsProc.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace loyalsoft;
  8. /**
  9. * Description of StatisticsProc
  10. *
  11. * @author cyzhao
  12. */
  13. class StatisticsProc {
  14. /**
  15. * 玩家自己任务完成统计
  16. * @param type $id
  17. */
  18. static function SelfTaskDataCollect($taskId) {
  19. $task = $taskId."-".time();
  20. $arr = array();
  21. $arr[] = $task;
  22. $num = gMem()->rpush("SelfTaskDataCollect-".req()->uid."-". req()->zoneid, $arr);
  23. }
  24. /**
  25. * 统计当前服下uid的最新的任务id
  26. * @param type $taskId
  27. */
  28. static function TaskDataCollect($taskId) {
  29. $key = "TaskDataCollect-".req()->zoneid;
  30. gMem()->hset($key, req()->uid, $taskId);
  31. }
  32. // static function TaskDataCollect($taskId) {
  33. // $key = "TaskDataCollect-".req()->zoneid;
  34. // gMem()->hset($key, req()->uid, $taskId);
  35. // }
  36. }