PC-202304251453\Administrator преди 5 месеца
родител
ревизия
723b825201

+ 0 - 21
app/v1/controller/center/GameController.php

@@ -120,26 +120,6 @@ class GameController extends BaseController
         return $this->success();
     }
 
-    /**
-     * 获取所有的游戏数据
-     */
-    public function getAllGameData(Request $request): Response
-    {
-        $where = $request->get();
-        $list = $this->logic->getAllGameData($where);
-        return $this->success($list);
-    }
-
-    /**
-     * 根据部门ID获取游戏列表
-     */
-    public function getGameListByDeptId(Request $request): Response
-    {
-        $dept_id = $request->get('dept_id');
-        $game_list = $this->logic->getGameListByDeptId($dept_id);
-        return $this->success($game_list);
-    }
-
     /**
      * 设置部门游戏权限
      */
@@ -150,5 +130,4 @@ class GameController extends BaseController
         $this->logic->setGameListByDeptId($dept_id, $game_list);
         return $this->success();
     }
-
 }

+ 0 - 37
app/v1/logic/center/GameLogic.php

@@ -152,24 +152,6 @@ class GameLogic extends BaseLogic
 
         return $result;
     }
-    
-    /**
-     * 获取所有的游戏数据
-     */
-    public function getAllGameData($where)
-    {
-        $auth_game_list = request()->header('auth_game_list');
-        $query = $this->search($where);
-        if(!empty($auth_game_list)) {
-            $authGameList = explode(',', $auth_game_list);
-            $query->where('id', 'in', $authGameList);
-        }
-        $query->where('status', 1);
-        $query->order('sort', 'desc');
-        $gameList = $this->getList($query);
-
-        return $this->gameMainTree($gameList);
-    }
 
     public function gameMainTree($gameList): array
     {
@@ -253,25 +235,6 @@ class GameLogic extends BaseLogic
         return array_values($groupedGames);
     }
 
-
-    /**
-     * 根据部门ID获取游戏列表
-     * @param array $where
-     * @return array
-     */
-    public function getGameListByDeptId($dept_id)
-    
-    {
-        $game_ids = $this->systemDeptLogic->getGameIdsByDeptId($dept_id);
-
-        if($game_ids==='*'){
-            $gameList = $this->model->where('status', 1)->order('sort', 'desc')->select()->toArray();
-        }else{
-            $gameList = $this->model->where('id', 'in', $game_ids)->where('status', 1)->order('sort', 'desc')->select()->toArray();
-        }
-        return $this->gameMainTree($gameList);
-    }
-
     /**
      * 设置部门游戏权限
      * @param array $where

+ 0 - 12
plugin/saiadmin/app/controller/system/SystemDeptController.php

@@ -136,16 +136,4 @@ class SystemDeptController extends BaseController
             return $this->fail('参数错误,请检查');
         }
     }
-
-    /**
-     * 获取部门游戏列表
-     * @param Request $request
-     * @return Response
-     */
-    public function getGameListByDeptId(Request $request) : Response
-    {
-        $dept_id = $request->more(['dept_id']);
-        $data = $this->logic->getGameListByDeptId($dept_id);
-        return $this->success($data);
-    }
 }

+ 0 - 2
plugin/saiadmin/app/logic/system/SystemDeptLogic.php

@@ -37,8 +37,6 @@ class SystemDeptLogic extends BaseLogic
     public function add($data): mixed
     {
         $data = $this->handleData($data);
-        // 继承父部门的权限
-        // $data['game_list'] = $this->getGameListByDeptId(['dept_id' => $data['parent_id']]);
         $this->model->save($data);
         return $this->model->getKey();
     }

+ 0 - 1
plugin/saiadmin/config/route.php

@@ -49,7 +49,6 @@ Route::group('/core', function () {
     Route::get("/dept/leaders",[\plugin\saiadmin\app\controller\system\SystemDeptController::class, 'leaders']);
     Route::post("/dept/addLeader",[\plugin\saiadmin\app\controller\system\SystemDeptController::class, 'addLeader']);
     Route::delete("/dept/delLeader",[\plugin\saiadmin\app\controller\system\SystemDeptController::class, 'delLeader']);
-    Route::get("/dept/getGameListByDeptId",[\plugin\saiadmin\app\controller\system\SystemDeptController::class, 'getGameListByDeptId']);
 
     // 岗位管理
     fastRoute('post',\plugin\saiadmin\app\controller\system\SystemPostController::class);