* @version : HUOSDK 8.0 */ namespace huo\logic\game; use huo\model\common\CommonModel; use huo\model\game\GameModel; class GameListLogic extends CommonModel { /** * @param array $param * * @return array */ protected function getWhere($param = []) { $_map = []; if (!empty($param['game_id'])) { $_map['app_id'] = $param['game_id']; } if (!empty($param['app_id'])) { $_map['app_id'] = $param['app_id']; } if (!empty($param['benefit_type'])) { $_map['benefit_type'] = $param['benefit_type']; } if (!empty($param['promote_switch'])) { $_map['promote_switch'] = $param['promote_switch']; } if (!empty($param['classify'])) { $_map['classify'] = $param['classify']; } return $_map; } public function getField() { return []; } /** * @param array $field * @param $where * @param string $page * @param string $order * * @return \think\Paginator * @throws \think\exception\DbException */ public function getAdminTgList($field = [], $where, $order = '-create_time') { $_map = $where; $_model = new GameModel(); $order = $this->orderFilter($order); return $_model->with('rate')->field($field)->where($_map)->order($order)->paginate(); } }