GameserverLogic.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * GameserverLogic.php UTF-8
  4. *
  5. *
  6. * @date : 2018/1/25 11:56
  7. *
  8. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  9. * @author : linjiebin <ljb@huosdk.com>
  10. * @version : HUOSDK 8.0
  11. */
  12. namespace web\pc\logic;
  13. use huo\model\common\CommonModel;
  14. use huo\model\game\GameserverModel;
  15. use huo\model\game\CategoryModel;
  16. use huolib\constant\GameConst;
  17. class GameserverLogic extends CommonModel {
  18. public function getList($where, $page) {
  19. $_map = $where;
  20. $_map['g.classify'] = ['neq', GameConst::GAME_H5];
  21. $_m = new GameserverModel();
  22. $_list = $_m->_getList($_map, $page);
  23. $_cate_model = new CategoryModel();
  24. $_game_model = new GameLogic();
  25. foreach ($_list as $_k => $_v) {
  26. $_list[$_k]['type'] = $_cate_model->getNameByIds($_v['category']);
  27. $_list[$_k]['gift_cnt'] = $_game_model->getGiftCnt($_v['app_id']);
  28. }
  29. //处理时间=>开服
  30. $_rdata = [];
  31. foreach ($_list as $_k1 => $_v1) {
  32. $_rdata[date('H:i', $_v1['start_time'])][] = $_v1;
  33. }
  34. return $_rdata;
  35. }
  36. }