123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * GameserverLogic.php UTF-8
- *
- *
- * @date : 2018/1/25 11:56
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : linjiebin <ljb@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace web\pc\logic;
- use huo\model\common\CommonModel;
- use huo\model\game\GameserverModel;
- use huo\model\game\CategoryModel;
- use huolib\constant\GameConst;
- class GameserverLogic extends CommonModel {
- public function getList($where, $page) {
- $_map = $where;
- $_map['g.classify'] = ['neq', GameConst::GAME_H5];
- $_m = new GameserverModel();
- $_list = $_m->_getList($_map, $page);
- $_cate_model = new CategoryModel();
- $_game_model = new GameLogic();
- foreach ($_list as $_k => $_v) {
- $_list[$_k]['type'] = $_cate_model->getNameByIds($_v['category']);
- $_list[$_k]['gift_cnt'] = $_game_model->getGiftCnt($_v['app_id']);
- }
- //处理时间=>开服
- $_rdata = [];
- foreach ($_list as $_k1 => $_v1) {
- $_rdata[date('H:i', $_v1['start_time'])][] = $_v1;
- }
- return $_rdata;
- }
- }
|