| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\v1\logic\center;
- use plugin\saiadmin\basic\BaseLogic;
- use plugin\saiadmin\exception\ApiException;
- use app\v1\model\center\GameMain;
- use plugin\saiadmin\app\model\system\SystemUser;
- /**
- * 产品管理逻辑层
- */
- class GameMainLogic extends BaseLogic
- {
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->model = new GameMain();
- }
- /**
- * 获取主游戏options列表
- * @param int $userId
- * @return array
- */
- public function getMainGameOptions()
- {
- $list = $this->model->field('id,name')->where('status', 1)->order('sort', 'desc')->select()->toArray();
- $list = array_map(function ($item) {
- return [
- 'label' => $item['name'],
- 'value' => $item['id']
- ];
- }, $list);
- return $list;
- }
- /**
- * 获取主包map
- * @return array
- */
- public function getMainGameMap()
- {
- return $this->model->column('name', 'id');
- }
- }
|