Cron.php 902 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Passport\Lib;
  3. use Dever;
  4. class Cron
  5. {
  6. public function combine_api()
  7. {
  8. }
  9. # 定时合并
  10. public function combine()
  11. {
  12. $combine = Dever::project('combine');
  13. if ($combine) {
  14. $where['status'] = 1;
  15. $data = Dever::db('passport/combine')->state($where);
  16. if ($data) {
  17. foreach ($data as $k => $v) {
  18. //$drop = implode(',', $v['old_uid']);
  19. $drop = $v['old_uid'];
  20. Dever::load('combine/lib/core.handle?uid=' . $v['new_uid'] . '&drop=' . $drop);
  21. $update['where_id'] = $v['id'];
  22. $update['status'] = 2;
  23. Dever::db('passport/combine')->update($update);
  24. }
  25. }
  26. //Dever::daemon('lib/core.handle?uid=' . $cur . '&drop=' . $drop, 'combine');
  27. }
  28. return 'ok';
  29. }
  30. }