| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 | <?php/** * GameListLogic.php UTF-8 * 游戏列表逻辑 * * @date    : 2018/5/19 16:25 * * @license 这不是一个自由软件,未经授权不许任何使用和传播。 * @author  : wuyonghong <wyh@huosdk.com> * @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();    }}
 |