Quellcode durchsuchen

Merge remote-tracking branch 'origin/20241023_lj_zhinengbumen' into dev

ai vor 6 Monaten
Ursprung
Commit
392008014a

+ 8 - 3
.env

@@ -1,6 +1,6 @@
-APP_NAME=public_producer
+APP_NAME=user_producer
 APP_ENV=dev
-
+HOST = http://101.254.114.211:13306/
 DB_DRIVER=mysql
 DB_HOST=101.254.114.211
 DB_PORT=13306
@@ -14,4 +14,9 @@ DB_PREFIX=
 REDIS_HOST=101.254.114.211
 REDIS_AUTH=YPWWnFnNebc7427B
 REDIS_PORT=26739
-REDIS_DB=0
+REDIS_DB=0
+
+AMQP_HOST=103.105.201.2
+AMQP_PORT=5673
+AMQP_USER=rabbitmq
+AMQP_PASSWORD=H8eDTAk6LY7EjJ8y

+ 5 - 0
.gitignore

@@ -20,3 +20,8 @@ runtime/logs/hyperf.log
 # Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
 # should NOT be excluded as they contain compiler settings and other important
 # information for Eclipse / Flash Builder.
+runtime/hyperf.pid
+runtime/hyperf.pid
+runtime/hyperf.pid
+runtime/container/classes.cache
+runtime/container/scan.cache

+ 224 - 146
app/JsonRpc/PublicRpcService.php

@@ -1,13 +1,14 @@
 <?php
 namespace App\JsonRpc;
+
 use App\Model\Department;
-use App\Model\District;
-use App\Model\LevelUser;
-use App\Model\UserLevel;
 use App\Model\LetterOfComplaint;
 use App\Model\LetterType;
-use Hyperf\RpcServer\Annotation\RpcService;
+use App\Model\LevelUser;
+use App\Model\UserLevel;
 use App\Tools\Result;
+use Hyperf\RpcServer\Annotation\RpcService;
+
 #[RpcService(name: "PublicRpcService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
 class PublicRpcService implements PublicRpcServiceInterface
 {
@@ -19,27 +20,14 @@ class PublicRpcService implements PublicRpcServiceInterface
     public function getDistrictList(array $data): array
     {
         $where = [];
-       if(isset($data['keyWord'])){
-           $where = [
-               ['name','like','%'.$data['keyWord'].'%']
-           ];
-       }
-
-        $result  = [];
-        if(isset($data['pageSize'])){
-            $rep = District::where($where)->limit($data['pageSize'])->offset(($data['page']-1)*$data['pageSize'])->orderBy("code","asc")->get();
-            $count = District::where($where)->count();
-            $result = [
-                'rows'=>$rep,
-                'count'=>$count
+        if (isset($data['keyWord'])) {
+            $where = [
+                ['name', 'like', '%' . $data['keyWord'] . '%'],
             ];
-        }else{
-            $result = District::where($data)->orderBy("code","asc")->get();
         }
-        
-        return $result?Result::success($result):Result::error("没有查到数据");
-    }
 
+        return $result ? Result::success($result) : Result::error("没有查到数据");
+    }
 
     /**
      * @param array $data
@@ -48,23 +36,23 @@ class PublicRpcService implements PublicRpcServiceInterface
     public function getUserLevelList(array $data): array
     {
         $where = [];
-        if(isset($data['keyWord'])){
+        if (isset($data['keyWord'])) {
             $where = [
-                ['name','like','%'.$data['keyWord'].'%']
+                ['name', 'like', '%' . $data['keyWord'] . '%'],
             ];
         }
         $result = [];
-        if(isset($data['pageSize'])){
-            $rep = UserLevel::where($where)->limit($data['pageSize'])->offset(($data['page']-1)*$data['pageSize'])->orderBy("id","asc")->get();
+        if (isset($data['pageSize'])) {
+            $rep = UserLevel::where($where)->limit($data['pageSize'])->offset(($data['page'] - 1) * $data['pageSize'])->orderBy("id", "asc")->get();
             $count = UserLevel::where($where)->count();
             $result = [
-                'rows'=>$rep,
-                'count'=>$count
+                'rows' => $rep,
+                'count' => $count,
             ];
-        }else{
-            $result = UserLevel::orderBy("id","asc")->get();
+        } else {
+            $result = UserLevel::orderBy("id", "asc")->get();
         }
-        return $result?Result::success($result):Result::error("没有查到数据");
+        return $result ? Result::success($result) : Result::error("没有查到数据");
     }
 
     /**
@@ -72,7 +60,7 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function addUserLevel(array $data) :array
+    public function addUserLevel(array $data): array
     {
         LevelUser::insertGetId($data);
         return Result::success([]);
@@ -82,14 +70,14 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function updateUserLevel(array $data) :array
+    public function updateUserLevel(array $data): array
     {
 
-        $result = LevelUser::where(['id'=>$data['id']])->update($data);
+        $result = LevelUser::where(['id' => $data['id']])->update($data);
         if ($result) {
             return Result::success($result);
         }
-        return  Result::error("更新失败");
+        return Result::error("更新失败");
     }
 
     /**
@@ -97,14 +85,14 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function delUserLevel(array $data) :array
+    public function delUserLevel(array $data): array
     {
 
-        $result = LevelUser::where(['id'=>$data['id']])->delete();
+        $result = LevelUser::where(['id' => $data['id']])->delete();
         if ($result) {
             return Result::success($result);
         }
-        return  Result::error("删除失败");
+        return Result::error("删除失败");
     }
 
     /**
@@ -112,79 +100,80 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function getLetterOfComplaint(array $data=[]) :array{
+    public function getLetterOfComplaint(array $data = []): array
+    {
         $where = [];
 
-        if(isset($data['user_id']) && !empty($data['user_id'])){
-            array_push($where,['letter_of_complaint.user_id','=',$data['user_id']]);
+        if (isset($data['user_id']) && !empty($data['user_id'])) {
+            array_push($where, ['letter_of_complaint.user_id', '=', $data['user_id']]);
         }
-        if(isset($data['nature']) && !empty($data['nature'])){
-           array_push($where,['letter_of_complaint.nature','=',$data['nature']]);
+        if (isset($data['nature']) && !empty($data['nature'])) {
+            array_push($where, ['letter_of_complaint.nature', '=', $data['nature']]);
         }
-        if(isset($data['type']) && !empty($data['type'])){
-            array_push($where,['letter_of_complaint.type','=',$data['type']]);
+        if (isset($data['type']) && !empty($data['type'])) {
+            array_push($where, ['letter_of_complaint.type', '=', $data['type']]);
         }
-        if(isset($data['nature_level']) && !empty($data['nature_level'])){
-            array_push($where,['letter_of_complaint.nature_level','=',$data['nature_level']]);
+        if (isset($data['nature_level']) && !empty($data['nature_level'])) {
+            array_push($where, ['letter_of_complaint.nature_level', '=', $data['nature_level']]);
         }
-        if(isset($data['type_level']) && !empty($data['type_level'])){
-            array_push($where,['letter_of_complaint.type_level','=',$data['type_level']]);
+        if (isset($data['type_level']) && !empty($data['type_level'])) {
+            array_push($where, ['letter_of_complaint.type_level', '=', $data['type_level']]);
         }
-        if(isset($data['status']) && !empty($data['status'])){
-            array_push($where,['letter_of_complaint.status','=',$data['status']]);
+        if (isset($data['status']) && !empty($data['status'])) {
+            array_push($where, ['letter_of_complaint.status', '=', $data['status']]);
         }
-        $result  = [];
-        if(isset($data['pageSize'])){
+        $result = [];
+        if (isset($data['pageSize'])) {
             $rep = LetterOfComplaint::where($where)
-                ->leftJoin("letter_type as type_a","letter_of_complaint.nature","type_a.id")
-                ->leftJoin("letter_type as type_b","letter_of_complaint.type","type_b.id")
-                ->leftJoin("letter_type as type_c","letter_of_complaint.nature_level","type_c.id")
-                ->leftJoin("letter_type as type_d","letter_of_complaint.status","type_d.id")
-                ->leftJoin("letter_type as type_e","letter_of_complaint.type_level","type_e.id")
+                ->leftJoin("letter_type as type_a", "letter_of_complaint.nature", "type_a.id")
+                ->leftJoin("letter_type as type_b", "letter_of_complaint.type", "type_b.id")
+                ->leftJoin("letter_type as type_c", "letter_of_complaint.nature_level", "type_c.id")
+                ->leftJoin("letter_type as type_d", "letter_of_complaint.status", "type_d.id")
+                ->leftJoin("letter_type as type_e", "letter_of_complaint.type_level", "type_e.id")
                 ->select("letter_of_complaint.*",
                     "type_a.type_name as nature_name",
                     "type_b.type_name as type_name",
                     "type_c.type_name as nature_level_name",
                     "type_d.type_name as status_name",
                     "type_e.type_name as type_level_name")
-                ->limit($data['pageSize'])->offset(($data['page']-1)*$data['pageSize'])->orderBy("letter_of_complaint.id","desc")->get();
+                ->limit($data['pageSize'])->offset(($data['page'] - 1) * $data['pageSize'])->orderBy("letter_of_complaint.id", "desc")->get();
             $count = LetterOfComplaint::where($where)->count();
-            if($rep){
-                foreach ($rep as $val){
-                    if($val['judgment']){
-                        $val['judgment'] = json_decode( $val['judgment']);
+            if ($rep) {
+                foreach ($rep as $val) {
+                    if ($val['judgment']) {
+                        $val['judgment'] = json_decode($val['judgment']);
                     }
-                    if($val['audio_and_video']){
-                        $val['audio_and_video'] = json_decode( $val['audio_and_video']);
+                    if ($val['audio_and_video']) {
+                        $val['audio_and_video'] = json_decode($val['audio_and_video']);
                     }
-                    if($val['contract']){
-                        $val['contract'] = json_decode( $val['contract']);
+                    if ($val['contract']) {
+                        $val['contract'] = json_decode($val['contract']);
                     }
-                    if($val['qualifications']){
-                        $val['qualifications'] = json_decode( $val['qualifications']);
+                    if ($val['qualifications']) {
+                        $val['qualifications'] = json_decode($val['qualifications']);
                     }
                 }
             }
             $result = [
-                'rows'=>$rep,
-                'count'=>$count
+                'rows' => $rep,
+                'count' => $count,
             ];
-        }else{
+        } else {
             $result = LetterOfComplaint::where($where)
-                ->leftJoin("letter_type as type_a","letter_of_complaint.nature","type_a.id")
-                ->leftJoin("letter_type as type_b","letter_of_complaint.type","type_b.id")
-                ->leftJoin("letter_type as type_c","letter_of_complaint.nature_level","type_c.id")
-                ->leftJoin("letter_type as type_d","letter_of_complaint.status","type_d.id")
-                ->leftJoin("letter_type as type_e","letter_of_complaint.type_level","type_e.id")
+                ->leftJoin("letter_type as type_a", "letter_of_complaint.nature", "type_a.id")
+                ->leftJoin("letter_type as type_b", "letter_of_complaint.type", "type_b.id")
+                ->leftJoin("letter_type as type_c", "letter_of_complaint.nature_level", "type_c.id")
+                ->leftJoin("letter_type as type_d", "letter_of_complaint.status", "type_d.id")
+                ->leftJoin("letter_type as type_e", "letter_of_complaint.type_level", "type_e.id")
                 ->select("letter_of_complaint.*",
                     "type_a.type_name as nature_name",
                     "type_b.type_name as type_name",
                     "type_c.type_name as nature_level_name",
                     "type_d.type_name as status_name",
                     "type_e.type_name as type_level_name")
-                ->orderBy("letter_of_complaint.id","desc")->get();
+                ->orderBy("letter_of_complaint.id", "desc")->get();
         }
-        return $result?Result::success($result):Result::error("没有查到数据");
+        return $result ? Result::success($result) : Result::error("没有查到数据");
     }
 
     /**
@@ -192,11 +181,12 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function addLetterOfComplaint(array $data) :array{
-        $data['judgment'] = $data['judgment']?json_encode($data['judgment']):'';
-        $data['audio_and_video'] = $data['audio_and_video']?json_encode($data['audio_and_video']):'';
-        $data['contract'] = $data['contract']?json_encode($data['contract']):'';
-        $data['qualifications'] = $data['qualifications']?json_encode($data['qualifications']):'';
+    public function addLetterOfComplaint(array $data): array
+    {
+        $data['judgment'] = $data['judgment'] ? json_encode($data['judgment']) : '';
+        $data['audio_and_video'] = $data['audio_and_video'] ? json_encode($data['audio_and_video']) : '';
+        $data['contract'] = $data['contract'] ? json_encode($data['contract']) : '';
+        $data['qualifications'] = $data['qualifications'] ? json_encode($data['qualifications']) : '';
         unset($data['id']);
         $result = LetterOfComplaint::insertGetId($data);
         if (empty($result)) {
@@ -211,13 +201,13 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function userUpLetterOfComplaint(array $data) :array
+    public function userUpLetterOfComplaint(array $data): array
     {
-        $data['judgment'] = $data['judgment']?json_encode($data['judgment']):'';
-        $data['audio_and_video'] = $data['audio_and_video']?json_encode($data['audio_and_video']):'';
-        $data['contract'] = $data['contract']?json_encode($data['contract']):'';
-        $data['qualifications'] = $data['qualifications']?json_encode($data['qualifications']):'';
-        $result = LetterOfComplaint::where(['id'=>$data['id']])->update($data);
+        $data['judgment'] = $data['judgment'] ? json_encode($data['judgment']) : '';
+        $data['audio_and_video'] = $data['audio_and_video'] ? json_encode($data['audio_and_video']) : '';
+        $data['contract'] = $data['contract'] ? json_encode($data['contract']) : '';
+        $data['qualifications'] = $data['qualifications'] ? json_encode($data['qualifications']) : '';
+        $result = LetterOfComplaint::where(['id' => $data['id']])->update($data);
         if (empty($result)) {
             return Result::error("创建失败", 0);
         } else {
@@ -229,29 +219,30 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function upLetterOfComplaint(array $data) :array{
-        var_dump("admin:",$data);
+    public function upLetterOfComplaint(array $data): array
+    {
+        var_dump("admin:", $data);
         $where = [
-            'id'=>$data['id']
+            'id' => $data['id'],
         ];
 
-        $filtered_array = array_filter($data, function($value) {
+        $filtered_array = array_filter($data, function ($value) {
             return $value !== "" && $value !== null && $value !== false && !is_array($value) || !empty($value);
         });
-        $filtered_array['judgment'] = isset($filtered_array['judgment'])?json_encode($filtered_array['judgment']):'';
-        $filtered_array['audio_and_video'] = isset($filtered_array['audio_and_video'])?json_encode($filtered_array['audio_and_video']):'';
-        $filtered_array['contract'] = isset($filtered_array['contract'])?json_encode($filtered_array['contract']):'';
-        $filtered_array['qualifications'] = isset($filtered_array['qualifications'])?json_encode($filtered_array['qualifications']):'';
+        $filtered_array['judgment'] = isset($filtered_array['judgment']) ? json_encode($filtered_array['judgment']) : '';
+        $filtered_array['audio_and_video'] = isset($filtered_array['audio_and_video']) ? json_encode($filtered_array['audio_and_video']) : '';
+        $filtered_array['contract'] = isset($filtered_array['contract']) ? json_encode($filtered_array['contract']) : '';
+        $filtered_array['qualifications'] = isset($filtered_array['qualifications']) ? json_encode($filtered_array['qualifications']) : '';
         unset($filtered_array['nature_name']);
         unset($filtered_array['type_name']);
         unset($filtered_array['nature_level_name']);
         unset($filtered_array['status_name']);
         unset($filtered_array['is_admin']);
         unset($filtered_array['type_level_name']);
-       $result =  LetterOfComplaint::where($where)->update($filtered_array);
-       if($result){
-           return Result::success( $result);
-       }
+        $result = LetterOfComplaint::where($where)->update($filtered_array);
+        if ($result) {
+            return Result::success($result);
+        }
         return Result::error("更新失败", 0);
     }
 
@@ -260,38 +251,40 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-   public function getLetterOfComplaintInfo(array $data) :array{
-       $where = [
-           'letter_of_complaint.id'=>$data['id'],
-       ];
-       if(isset($data['user_id']) && !empty($data['user_id'])){
-           array_push($where,['letter_of_complaint.user_id','=',$data['user_id']]);
-       }
-       $result = LetterOfComplaint::where($where)
-           ->leftJoin("letter_type as type_a","letter_of_complaint.nature","type_a.id")
-           ->leftJoin("letter_type as type_b","letter_of_complaint.type","type_b.id")
-           ->leftJoin("letter_type as type_c","letter_of_complaint.nature_level","type_c.id")
-           ->leftJoin("letter_type as type_d","letter_of_complaint.status","type_d.id")
-           ->leftJoin("letter_type as type_e","letter_of_complaint.type_level","type_e.id")
-           ->select("letter_of_complaint.*",
-               "type_a.type_name as nature_name",
-               "type_b.type_name as type_name",
-               "type_c.type_name as nature_level_name",
-               "type_d.type_name as status_name",
-               "type_e.type_name as type_level_name")
-           ->first();
-       return Result::success( $result);
-   }
+    public function getLetterOfComplaintInfo(array $data): array
+    {
+        $where = [
+            'letter_of_complaint.id' => $data['id'],
+        ];
+        if (isset($data['user_id']) && !empty($data['user_id'])) {
+            array_push($where, ['letter_of_complaint.user_id', '=', $data['user_id']]);
+        }
+        $result = LetterOfComplaint::where($where)
+            ->leftJoin("letter_type as type_a", "letter_of_complaint.nature", "type_a.id")
+            ->leftJoin("letter_type as type_b", "letter_of_complaint.type", "type_b.id")
+            ->leftJoin("letter_type as type_c", "letter_of_complaint.nature_level", "type_c.id")
+            ->leftJoin("letter_type as type_d", "letter_of_complaint.status", "type_d.id")
+            ->leftJoin("letter_type as type_e", "letter_of_complaint.type_level", "type_e.id")
+            ->select("letter_of_complaint.*",
+                "type_a.type_name as nature_name",
+                "type_b.type_name as type_name",
+                "type_c.type_name as nature_level_name",
+                "type_d.type_name as status_name",
+                "type_e.type_name as type_level_name")
+            ->first();
+        return Result::success($result);
+    }
 
     /**
      * 删除投诉举报信息
      * @param array $data
      * @return array
      */
-    public function delLetterOfComplaint(array $data) :array{
+    public function delLetterOfComplaint(array $data): array
+    {
         $where = [
-            'id'=> $data['id'],
-            'user_id'=>$data['user_id']
+            'id' => $data['id'],
+            'user_id' => $data['user_id'],
         ];
         $result = LetterOfComplaint::where($where)->delete();
         if (empty($result)) {
@@ -305,13 +298,14 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function getLetterType(array $data) :array{
+    public function getLetterType(array $data): array
+    {
         $where = [];
-        if(isset($data['type'])){
-            array_push($where,['type','=',$data['type']]);
+        if (isset($data['type'])) {
+            array_push($where, ['type', '=', $data['type']]);
         }
-        $result =  LetterType::where($where)->get();
-        return $result?Result::success($result):Result::error("没有查到数据");
+        $result = LetterType::where($where)->get();
+        return $result ? Result::success($result) : Result::error("没有查到数据");
     }
 
     /**
@@ -319,7 +313,8 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function upLetterType(array $data) :array{
+    public function upLetterType(array $data): array
+    {
         return [];
     }
 
@@ -328,7 +323,8 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function addLetterType(array $data) :array{
+    public function addLetterType(array $data): array
+    {
         $result = LetterType::insertGetId($data);
         if (empty($result)) {
             return Result::error("创建失败", 0);
@@ -342,7 +338,8 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function delLetterType(array $data) :array{
+    public function delLetterType(array $data): array
+    {
         $result = LetterType::where('id', $data['id'])->delete();
         if (empty($result)) {
             return Result::error("删除失败", 0);
@@ -356,17 +353,18 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function checkMeasure(array $data) :array{
+    public function checkMeasure(array $data): array
+    {
         $where = [
-            'id'=>$data['id']
+            'id' => $data['id'],
         ];
         $letterOfComplaintInfo = LetterOfComplaint::where($where)->first();
-        var_dump("查询数据:",$letterOfComplaintInfo['admin_id'],$data['user_id']);
+        var_dump("查询数据:", $letterOfComplaintInfo['admin_id'], $data['user_id']);
         //操作人和当前登陆用户id 相等说明是当前人接收的案件
-        if(($letterOfComplaintInfo['admin_id'] == $data['user_id']) || empty($letterOfComplaintInfo['admin_id'])){
+        if (($letterOfComplaintInfo['admin_id'] == $data['user_id']) || empty($letterOfComplaintInfo['admin_id'])) {
             return Result::success();
-        }else{
-             return  Result::error("您不能处理其他人已经接过的案件", 0);
+        } else {
+            return Result::error("您不能处理其他人已经接过的案件", 0);
         }
 
     }
@@ -376,16 +374,96 @@ class PublicRpcService implements PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
-    public function getDepartment(array $data) :array
+    public function getDepartment(array $data): array
     {
         $where = [
-            'pid'=>$data['pid']??0
+            'pid' => $data['pid'] ?? 0,
         ];
-        $result = Department::where($where)->orderBy("sort","desc")->get();
+        $result = Department::where($where)->orderBy("sort", "desc")->get();
         if (empty($result)) {
             return Result::error("查询失败", 0);
-        }else{
+        } else {
             return Result::success($result);
         }
     }
-}
+
+    /**
+     * 后台获取职能部门
+     * @param array $data
+     * @return array
+     */
+    public function getZhinengbumenList(array $data): array
+    {
+
+        // 获取分页参数,默认每页 10 条记录
+        $page = isset($data['page']) ? (int) $data['page'] : 1;
+        $perPage = isset($data['pagesize']) ? (int) $data['pagesize'] : 10;
+
+        // 查询数据并分页
+        $query = Department::query();
+
+        // 可以在这里添加更多的查询条件
+        if (isset($data['search'])) {
+            $query->where('name', 'like', '%' . $data['search'] . '%');
+        }
+
+        // 执行分页查询
+        $result = $query->paginate($perPage, ['*'], 'page', $page);
+
+        // 返回分页结果
+        return Result::success([
+            'count' => $result->total(),
+            'current_page' => $result->currentPage(),
+            'last_page' => $result->lastPage(),
+            'pagesize' => $result->perPage(),
+            'rows' => $result->items(),
+        ]);
+    }
+
+    /**
+     * 添加获取职能部门
+     * @param array $data
+     * @return array
+     */
+    public function addZhinengbumen(array $data): array
+    {
+        $result = Department::insertGetId($data);
+        if (empty($result)) {
+            return Result::error("创建失败", 0);
+        } else {
+            return Result::success(["id" => $result]);
+        }
+    }
+    public function delZhinengbumen(array $data): array
+    {
+        $result = Department::where('id', $data['id'])->delete();
+        if (empty($result)) {
+            return Result::error("删除失败", 0);
+        } else {
+            return Result::success();
+        }
+    }
+    public function getZhinengbumen(array $data): array
+    {
+        $result = Department::where('id', $data['id'])->first();
+        return Result::success($result);
+    }
+    public function getPidZhinengbumen(array $data): array
+    {
+        if (empty($data['pid'])) {
+            $data['pid'] = 0;
+        }
+
+        $result = Department::where('pid', $data['pid'])->get();
+        return Result::success($result);
+    }
+    public function modZhinengbumen(array $data): array
+    {
+        $result = Department::where('id', $data['id'])->update($data);
+        if (empty($result)) {
+            return Result::error("修改失败", 0);
+        } else {
+            return Result::success();
+        }
+    }
+}

+ 32 - 1
app/JsonRpc/PublicRpcServiceInterface.php

@@ -1,6 +1,7 @@
 <?php
 
 namespace App\JsonRpc;
+
 interface PublicRpcServiceInterface
 {
     /**
@@ -20,7 +21,6 @@ interface PublicRpcServiceInterface
      */
     public function addUserLevel(array $data): array;
 
-
     public function updateUserLevel(array $data): array;
 
     /**
@@ -97,7 +97,38 @@ interface PublicRpcServiceInterface
      * @param array $data
      * @return array
      */
+
     public function getDepartment(array $data): array;
 
+    public function getZhinengbumenList(array $data): array;
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function addZhinengbumen(array $data): array;
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function delZhinengbumen(array $data): array;
 
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getZhinengbumen(array $data): array;
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function getPidZhinengbumen(array $data): array;
+
+    /**
+     * @param array $data
+     * @return array
+     */
+    public function modZhinengbumen(array $data): array;
 }

+ 36 - 1
app/Model/Department.php

@@ -1,12 +1,47 @@
 <?php
 
-declare(strict_types=1);
+declare (strict_types = 1);
 
 namespace App\Model;
 
 use Hyperf\DbConnection\Model\Model;
 
 /**
+
+ * @property int $id
+ * @property int $pid
+ * @property string $name
+ * @property string $dir_name
+ * @property int $fid
+ * @property int $fup
+ * @property int $mid
+ * @property int $class
+ * @property int $sons
+ * @property int $type
+ * @property string $admin
+ * @property int $list
+ * @property int $listorder
+ * @property string $passwd
+ * @property string $logo
+ * @property string $descrip
+ * @property string $style
+ * @property string $template
+ * @property string $jumpurl
+ * @property int $maxperpage
+ * @property string $metakeywords
+ * @property string $metadescription
+ * @property int $allowcomment
+ * @property string $allowpost
+ * @property string $allowviewtitle
+ * @property string $allowviewcontent
+ * @property string $allowdownload
+ * @property int $forbidshow
+ * @property string $config
+ * @property int $index_show
+ * @property int $contents
+ * @property string $tableid
+ * @property int $sort
+
  */
 class Department extends Model
 {

+ 1 - 0
composer.json

@@ -30,6 +30,7 @@
         "hyperf/logger": "~3.1.0",
         "hyperf/memory": "~3.1.0",
         "hyperf/nacos": "^3.1",
+        "hyperf/paginator": "^3.1",
         "hyperf/process": "~3.1.0",
         "hyperf/redis": "~3.1.0",
         "hyperf/rpc-server": "*",

+ 70 - 2
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "aac08200b704c6f444f313b403adcdfc",
+    "content-hash": "e1c0d5614a20cf9b42168ead47cafc3d",
     "packages": [
         {
             "name": "carbonphp/carbon-doctrine-types",
@@ -3145,6 +3145,74 @@
             ],
             "time": "2024-03-23T11:28:51+00:00"
         },
+        {
+            "name": "hyperf/paginator",
+            "version": "v3.1.42",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/hyperf/paginator.git",
+                "reference": "b637a3deeee69f4a3e5a6d62ab8214244b98412a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/hyperf/paginator/zipball/b637a3deeee69f4a3e5a6d62ab8214244b98412a",
+                "reference": "b637a3deeee69f4a3e5a6d62ab8214244b98412a",
+                "shasum": ""
+            },
+            "require": {
+                "hyperf/contract": "~3.1.0",
+                "hyperf/support": "~3.1.0",
+                "hyperf/utils": "~3.1.0",
+                "php": ">=8.1"
+            },
+            "suggest": {
+                "hyperf/event": "Reqiured to use PageResolverListener.",
+                "hyperf/framework": "Reqiured to use PageResolverListener.",
+                "hyperf/http-server": "Reqiured to use PageResolverListener."
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1-dev"
+                },
+                "hyperf": {
+                    "config": "Hyperf\\Paginator\\ConfigProvider"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Hyperf\\Paginator\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A paginator component for hyperf.",
+            "homepage": "https://hyperf.io",
+            "keywords": [
+                "hyperf",
+                "paginator",
+                "php"
+            ],
+            "support": {
+                "docs": "https://hyperf.wiki",
+                "issues": "https://github.com/hyperf/hyperf/issues",
+                "pull-request": "https://github.com/hyperf/hyperf/pulls",
+                "source": "https://github.com/hyperf/hyperf"
+            },
+            "funding": [
+                {
+                    "url": "https://hyperf.wiki/#/zh-cn/donate",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://opencollective.com/hyperf",
+                    "type": "open_collective"
+                }
+            ],
+            "time": "2024-09-25T02:54:12+00:00"
+        },
         {
             "name": "hyperf/pipeline",
             "version": "v3.1.15",
@@ -10270,4 +10338,4 @@
     },
     "platform-dev": [],
     "plugin-api-version": "2.6.0"
-}
+}

+ 11 - 0
vendor/composer/autoload_classmap.php

@@ -31,6 +31,7 @@ return array(
     'App\\Model\\Template' => $baseDir . '/app/Model/Template.php',
     'App\\Model\\TemplateClass' => $baseDir . '/app/Model/TemplateClass.php',
     'App\\Model\\User' => $baseDir . '/app/Model/User.php',
+
     'App\\Model\\UserLevel' => $baseDir . '/app/Model/UserLevel.php',
     'App\\Model\\Website' => $baseDir . '/app/Model/Website.php',
     'App\\Model\\WebsiteCategory' => $baseDir . '/app/Model/WebsiteCategory.php',
@@ -1303,6 +1304,16 @@ return array(
     'Hyperf\\Nacos\\Provider\\InstanceProvider' => $vendorDir . '/hyperf/nacos/src/Provider/InstanceProvider.php',
     'Hyperf\\Nacos\\Provider\\OperatorProvider' => $vendorDir . '/hyperf/nacos/src/Provider/OperatorProvider.php',
     'Hyperf\\Nacos\\Provider\\ServiceProvider' => $vendorDir . '/hyperf/nacos/src/Provider/ServiceProvider.php',
+    'Hyperf\\Paginator\\AbstractCursorPaginator' => $vendorDir . '/hyperf/paginator/src/AbstractCursorPaginator.php',
+    'Hyperf\\Paginator\\AbstractPaginator' => $vendorDir . '/hyperf/paginator/src/AbstractPaginator.php',
+    'Hyperf\\Paginator\\ConfigProvider' => $vendorDir . '/hyperf/paginator/src/ConfigProvider.php',
+    'Hyperf\\Paginator\\Contract\\CursorPaginator' => $vendorDir . '/hyperf/paginator/src/Contract/CursorPaginator.php',
+    'Hyperf\\Paginator\\Cursor' => $vendorDir . '/hyperf/paginator/src/Cursor.php',
+    'Hyperf\\Paginator\\CursorPaginator' => $vendorDir . '/hyperf/paginator/src/CursorPaginator.php',
+    'Hyperf\\Paginator\\LengthAwarePaginator' => $vendorDir . '/hyperf/paginator/src/LengthAwarePaginator.php',
+    'Hyperf\\Paginator\\Listener\\PageResolverListener' => $vendorDir . '/hyperf/paginator/src/Listener/PageResolverListener.php',
+    'Hyperf\\Paginator\\Paginator' => $vendorDir . '/hyperf/paginator/src/Paginator.php',
+    'Hyperf\\Paginator\\UrlWindow' => $vendorDir . '/hyperf/paginator/src/UrlWindow.php',
     'Hyperf\\Pipeline\\Pipeline' => $vendorDir . '/hyperf/pipeline/src/Pipeline.php',
     'Hyperf\\Pool\\Channel' => $vendorDir . '/hyperf/pool/src/Channel.php',
     'Hyperf\\Pool\\ConfigProvider' => $vendorDir . '/hyperf/pool/src/ConfigProvider.php',

+ 1 - 0
vendor/composer/autoload_psr4.php

@@ -70,6 +70,7 @@ return array(
     'Hyperf\\Process\\' => array($vendorDir . '/hyperf/process/src'),
     'Hyperf\\Pool\\' => array($vendorDir . '/hyperf/pool/src'),
     'Hyperf\\Pipeline\\' => array($vendorDir . '/hyperf/pipeline/src'),
+    'Hyperf\\Paginator\\' => array($vendorDir . '/hyperf/paginator/src'),
     'Hyperf\\Nacos\\' => array($vendorDir . '/hyperf/nacos/src'),
     'Hyperf\\ModelListener\\' => array($vendorDir . '/hyperf/model-listener/src'),
     'Hyperf\\Memory\\' => array($vendorDir . '/hyperf/memory/src'),

+ 153 - 274
vendor/composer/autoload_static.php

@@ -6,7 +6,7 @@ namespace Composer\Autoload;
 
 class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
 {
-    public static $files = array (
+    public static $files = array(
         '9c7a683baffd24f5595c1dc5f5273030' => __DIR__ . '/..' . '/hyperf/engine/src/Functions.php',
         'f0334cce41da231af374e1df9dc548c9' => __DIR__ . '/..' . '/hyperf/collection/src/Functions.php',
         '3ac0459b8c20ccf3a7319b7cba59c914' => __DIR__ . '/..' . '/hyperf/tappable/src/Functions.php',
@@ -37,9 +37,8 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         '9b38cf48e83f5d8f60375221cd213eee' => __DIR__ . '/..' . '/phpstan/phpstan/bootstrap.php',
     );
 
-    public static $prefixLengthsPsr4 = array (
-        'S' => 
-        array (
+    public static $prefixLengthsPsr4 = array(
+        'S' => array(
             'Symfony\\Polyfill\\Php83\\' => 23,
             'Symfony\\Polyfill\\Php81\\' => 23,
             'Symfony\\Polyfill\\Php80\\' => 23,
@@ -62,8 +61,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'Symfony\\Component\\Console\\' => 26,
             'Swow\\Psr7\\Message\\' => 18,
         ),
-        'R' => 
-        array (
+        'R' => array(
             'React\\Stream\\' => 13,
             'React\\Socket\\' => 13,
             'React\\Promise\\' => 14,
@@ -72,8 +70,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'React\\ChildProcess\\' => 19,
             'React\\Cache\\' => 12,
         ),
-        'P' => 
-        array (
+        'P' => array(
             'Psr\\SimpleCache\\' => 16,
             'Psr\\Log\\' => 8,
             'Psr\\Http\\Server\\' => 16,
@@ -88,23 +85,19 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'PhpDocReader\\' => 13,
             'PhpCsFixer\\' => 11,
         ),
-        'M' => 
-        array (
+        'M' => array(
             'Monolog\\' => 8,
             'Mockery\\' => 8,
             'MathPHP\\' => 8,
         ),
-        'L' => 
-        array (
+        'L' => array(
             'Laminas\\Stdlib\\' => 15,
             'Laminas\\Mime\\' => 13,
         ),
-        'J' => 
-        array (
+        'J' => array(
             'JetBrains\\PhpStorm\\' => 19,
         ),
-        'H' => 
-        array (
+        'H' => array(
             'Hyperf\\Watcher\\' => 15,
             'Hyperf\\Testing\\' => 15,
             'Hyperf\\Tappable\\' => 16,
@@ -122,6 +115,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'Hyperf\\Process\\' => 15,
             'Hyperf\\Pool\\' => 12,
             'Hyperf\\Pipeline\\' => 16,
+            'Hyperf\\Paginator\\' => 17,
             'Hyperf\\Nacos\\' => 13,
             'Hyperf\\ModelListener\\' => 21,
             'Hyperf\\Memory\\' => 14,
@@ -159,25 +153,21 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'Hyperf\\Cache\\' => 13,
             'HyperfTest\\' => 11,
         ),
-        'G' => 
-        array (
+        'G' => array(
             'GuzzleHttp\\Psr7\\' => 16,
             'GuzzleHttp\\Promise\\' => 19,
             'GuzzleHttp\\' => 11,
             'GrahamCampbell\\ResultType\\' => 26,
         ),
-        'F' => 
-        array (
+        'F' => array(
             'Fig\\Http\\Message\\' => 17,
             'Fidry\\CpuCoreCounter\\' => 21,
             'FastRoute\\' => 10,
         ),
-        'E' => 
-        array (
+        'E' => array(
             'Evenement\\' => 10,
         ),
-        'D' => 
-        array (
+        'D' => array(
             'Dotenv\\' => 7,
             'Doctrine\\Instantiator\\' => 22,
             'Doctrine\\Inflector\\' => 19,
@@ -185,8 +175,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'Doctrine\\Common\\Annotations\\' => 28,
             'DeepCopy\\' => 9,
         ),
-        'C' => 
-        array (
+        'C' => array(
             'Composer\\XdebugHandler\\' => 23,
             'Composer\\Semver\\' => 16,
             'Composer\\Pcre\\' => 14,
@@ -194,502 +183,383 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
             'Carbon\\Doctrine\\' => 16,
             'Carbon\\' => 7,
         ),
-        'A' => 
-        array (
+        'A' => array(
             'App\\' => 4,
         ),
     );
 
-    public static $prefixDirsPsr4 = array (
-        'Symfony\\Polyfill\\Php83\\' => 
-        array (
+    public static $prefixDirsPsr4 = array(
+        'Symfony\\Polyfill\\Php83\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-php83',
         ),
-        'Symfony\\Polyfill\\Php81\\' => 
-        array (
+        'Symfony\\Polyfill\\Php81\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-php81',
         ),
-        'Symfony\\Polyfill\\Php80\\' => 
-        array (
+        'Symfony\\Polyfill\\Php80\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
         ),
-        'Symfony\\Polyfill\\Mbstring\\' => 
-        array (
+        'Symfony\\Polyfill\\Mbstring\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
         ),
-        'Symfony\\Polyfill\\Intl\\Normalizer\\' => 
-        array (
+        'Symfony\\Polyfill\\Intl\\Normalizer\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer',
         ),
-        'Symfony\\Polyfill\\Intl\\Grapheme\\' => 
-        array (
+        'Symfony\\Polyfill\\Intl\\Grapheme\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme',
         ),
-        'Symfony\\Polyfill\\Ctype\\' => 
-        array (
+        'Symfony\\Polyfill\\Ctype\\' => array(
             0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
         ),
-        'Symfony\\Contracts\\Translation\\' => 
-        array (
+        'Symfony\\Contracts\\Translation\\' => array(
             0 => __DIR__ . '/..' . '/symfony/translation-contracts',
         ),
-        'Symfony\\Contracts\\Service\\' => 
-        array (
+        'Symfony\\Contracts\\Service\\' => array(
             0 => __DIR__ . '/..' . '/symfony/service-contracts',
         ),
-        'Symfony\\Contracts\\EventDispatcher\\' => 
-        array (
+        'Symfony\\Contracts\\EventDispatcher\\' => array(
             0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts',
         ),
-        'Symfony\\Component\\Translation\\' => 
-        array (
+        'Symfony\\Component\\Translation\\' => array(
             0 => __DIR__ . '/..' . '/symfony/translation',
         ),
-        'Symfony\\Component\\String\\' => 
-        array (
+        'Symfony\\Component\\String\\' => array(
             0 => __DIR__ . '/..' . '/symfony/string',
         ),
-        'Symfony\\Component\\Stopwatch\\' => 
-        array (
+        'Symfony\\Component\\Stopwatch\\' => array(
             0 => __DIR__ . '/..' . '/symfony/stopwatch',
         ),
-        'Symfony\\Component\\Process\\' => 
-        array (
+        'Symfony\\Component\\Process\\' => array(
             0 => __DIR__ . '/..' . '/symfony/process',
         ),
-        'Symfony\\Component\\OptionsResolver\\' => 
-        array (
+        'Symfony\\Component\\OptionsResolver\\' => array(
             0 => __DIR__ . '/..' . '/symfony/options-resolver',
         ),
-        'Symfony\\Component\\HttpFoundation\\' => 
-        array (
+        'Symfony\\Component\\HttpFoundation\\' => array(
             0 => __DIR__ . '/..' . '/symfony/http-foundation',
         ),
-        'Symfony\\Component\\Finder\\' => 
-        array (
+        'Symfony\\Component\\Finder\\' => array(
             0 => __DIR__ . '/..' . '/symfony/finder',
         ),
-        'Symfony\\Component\\Filesystem\\' => 
-        array (
+        'Symfony\\Component\\Filesystem\\' => array(
             0 => __DIR__ . '/..' . '/symfony/filesystem',
         ),
-        'Symfony\\Component\\EventDispatcher\\' => 
-        array (
+        'Symfony\\Component\\EventDispatcher\\' => array(
             0 => __DIR__ . '/..' . '/symfony/event-dispatcher',
         ),
-        'Symfony\\Component\\Console\\' => 
-        array (
+        'Symfony\\Component\\Console\\' => array(
             0 => __DIR__ . '/..' . '/symfony/console',
         ),
-        'Swow\\Psr7\\Message\\' => 
-        array (
+        'Swow\\Psr7\\Message\\' => array(
             0 => __DIR__ . '/..' . '/swow/psr7-plus/src/Message',
         ),
-        'React\\Stream\\' => 
-        array (
+        'React\\Stream\\' => array(
             0 => __DIR__ . '/..' . '/react/stream/src',
         ),
-        'React\\Socket\\' => 
-        array (
+        'React\\Socket\\' => array(
             0 => __DIR__ . '/..' . '/react/socket/src',
         ),
-        'React\\Promise\\' => 
-        array (
+        'React\\Promise\\' => array(
             0 => __DIR__ . '/..' . '/react/promise/src',
         ),
-        'React\\EventLoop\\' => 
-        array (
+        'React\\EventLoop\\' => array(
             0 => __DIR__ . '/..' . '/react/event-loop/src',
         ),
-        'React\\Dns\\' => 
-        array (
+        'React\\Dns\\' => array(
             0 => __DIR__ . '/..' . '/react/dns/src',
         ),
-        'React\\ChildProcess\\' => 
-        array (
+        'React\\ChildProcess\\' => array(
             0 => __DIR__ . '/..' . '/react/child-process/src',
         ),
-        'React\\Cache\\' => 
-        array (
+        'React\\Cache\\' => array(
             0 => __DIR__ . '/..' . '/react/cache/src',
         ),
-        'Psr\\SimpleCache\\' => 
-        array (
+        'Psr\\SimpleCache\\' => array(
             0 => __DIR__ . '/..' . '/psr/simple-cache/src',
         ),
-        'Psr\\Log\\' => 
-        array (
+        'Psr\\Log\\' => array(
             0 => __DIR__ . '/..' . '/psr/log/src',
         ),
-        'Psr\\Http\\Server\\' => 
-        array (
+        'Psr\\Http\\Server\\' => array(
             0 => __DIR__ . '/..' . '/psr/http-server-handler/src',
             1 => __DIR__ . '/..' . '/psr/http-server-middleware/src',
         ),
-        'Psr\\Http\\Message\\' => 
-        array (
+        'Psr\\Http\\Message\\' => array(
             0 => __DIR__ . '/..' . '/psr/http-factory/src',
             1 => __DIR__ . '/..' . '/psr/http-message/src',
         ),
-        'Psr\\Http\\Client\\' => 
-        array (
+        'Psr\\Http\\Client\\' => array(
             0 => __DIR__ . '/..' . '/psr/http-client/src',
         ),
-        'Psr\\EventDispatcher\\' => 
-        array (
+        'Psr\\EventDispatcher\\' => array(
             0 => __DIR__ . '/..' . '/psr/event-dispatcher/src',
         ),
-        'Psr\\Container\\' => 
-        array (
+        'Psr\\Container\\' => array(
             0 => __DIR__ . '/..' . '/psr/container/src',
         ),
-        'Psr\\Clock\\' => 
-        array (
+        'Psr\\Clock\\' => array(
             0 => __DIR__ . '/..' . '/psr/clock/src',
         ),
-        'Psr\\Cache\\' => 
-        array (
+        'Psr\\Cache\\' => array(
             0 => __DIR__ . '/..' . '/psr/cache/src',
         ),
-        'PhpParser\\' => 
-        array (
+        'PhpParser\\' => array(
             0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
         ),
-        'PhpOption\\' => 
-        array (
+        'PhpOption\\' => array(
             0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
         ),
-        'PhpDocReader\\' => 
-        array (
+        'PhpDocReader\\' => array(
             0 => __DIR__ . '/..' . '/php-di/phpdoc-reader/src/PhpDocReader',
         ),
-        'PhpCsFixer\\' => 
-        array (
+        'PhpCsFixer\\' => array(
             0 => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src',
         ),
-        'Monolog\\' => 
-        array (
+        'Monolog\\' => array(
             0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
         ),
-        'Mockery\\' => 
-        array (
+        'Mockery\\' => array(
             0 => __DIR__ . '/..' . '/mockery/mockery/library/Mockery',
         ),
-        'MathPHP\\' => 
-        array (
+        'MathPHP\\' => array(
             0 => __DIR__ . '/..' . '/markrogoyski/math-php/src',
         ),
-        'Laminas\\Stdlib\\' => 
-        array (
+        'Laminas\\Stdlib\\' => array(
             0 => __DIR__ . '/..' . '/laminas/laminas-stdlib/src',
         ),
-        'Laminas\\Mime\\' => 
-        array (
+        'Laminas\\Mime\\' => array(
             0 => __DIR__ . '/..' . '/laminas/laminas-mime/src',
         ),
-        'JetBrains\\PhpStorm\\' => 
-        array (
+        'JetBrains\\PhpStorm\\' => array(
             0 => __DIR__ . '/..' . '/jetbrains/phpstorm-attributes/src',
         ),
-        'Hyperf\\Watcher\\' => 
-        array (
+        'Hyperf\\Watcher\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/watcher/src',
         ),
-        'Hyperf\\Testing\\' => 
-        array (
+        'Hyperf\\Testing\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/testing/src',
         ),
-        'Hyperf\\Tappable\\' => 
-        array (
+        'Hyperf\\Tappable\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/tappable/src',
         ),
-        'Hyperf\\Support\\' => 
-        array (
+        'Hyperf\\Support\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/support/src',
         ),
-        'Hyperf\\Stringable\\' => 
-        array (
+        'Hyperf\\Stringable\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/stringable/src',
         ),
-        'Hyperf\\Stdlib\\' => 
-        array (
+        'Hyperf\\Stdlib\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/stdlib/src',
         ),
-        'Hyperf\\ServiceGovernance\\' => 
-        array (
+        'Hyperf\\ServiceGovernance\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/service-governance/src',
         ),
-        'Hyperf\\ServiceGovernanceNacos\\' => 
-        array (
+        'Hyperf\\ServiceGovernanceNacos\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/service-governance-nacos/src',
         ),
-        'Hyperf\\ServiceGovernanceConsul\\' => 
-        array (
+        'Hyperf\\ServiceGovernanceConsul\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/service-governance-consul/src',
         ),
-        'Hyperf\\Server\\' => 
-        array (
+        'Hyperf\\Server\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/server/src',
         ),
-        'Hyperf\\Serializer\\' => 
-        array (
+        'Hyperf\\Serializer\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/serializer/src',
         ),
-        'Hyperf\\Rpc\\' => 
-        array (
+        'Hyperf\\Rpc\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/rpc/src',
         ),
-        'Hyperf\\RpcServer\\' => 
-        array (
+        'Hyperf\\RpcServer\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/rpc-server/src',
         ),
-        'Hyperf\\Redis\\' => 
-        array (
+        'Hyperf\\Redis\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/redis/src',
         ),
-        'Hyperf\\Process\\' => 
-        array (
+        'Hyperf\\Process\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/process/src',
         ),
-        'Hyperf\\Pool\\' => 
-        array (
+        'Hyperf\\Pool\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/pool/src',
         ),
-        'Hyperf\\Pipeline\\' => 
-        array (
+        'Hyperf\\Pipeline\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/pipeline/src',
         ),
-        'Hyperf\\Nacos\\' => 
-        array (
+        'Hyperf\\Paginator\\' => array(
+            0 => __DIR__ . '/..' . '/hyperf/paginator/src',
+        ),
+        'Hyperf\\Nacos\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/nacos/src',
         ),
-        'Hyperf\\ModelListener\\' => 
-        array (
+        'Hyperf\\ModelListener\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/model-listener/src',
         ),
-        'Hyperf\\Memory\\' => 
-        array (
+        'Hyperf\\Memory\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/memory/src',
         ),
-        'Hyperf\\Macroable\\' => 
-        array (
+        'Hyperf\\Macroable\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/macroable/src',
         ),
-        'Hyperf\\Logger\\' => 
-        array (
+        'Hyperf\\Logger\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/logger/src',
         ),
-        'Hyperf\\LoadBalancer\\' => 
-        array (
+        'Hyperf\\LoadBalancer\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/load-balancer/src',
         ),
-        'Hyperf\\JsonRpc\\' => 
-        array (
+        'Hyperf\\JsonRpc\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/json-rpc/src',
         ),
-        'Hyperf\\HttpServer\\' => 
-        array (
+        'Hyperf\\HttpServer\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/http-server/src',
         ),
-        'Hyperf\\HttpMessage\\' => 
-        array (
+        'Hyperf\\HttpMessage\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/http-message/src',
         ),
-        'Hyperf\\Guzzle\\' => 
-        array (
+        'Hyperf\\Guzzle\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/guzzle/src',
         ),
-        'Hyperf\\Framework\\' => 
-        array (
+        'Hyperf\\Framework\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/framework/src',
         ),
-        'Hyperf\\ExceptionHandler\\' => 
-        array (
+        'Hyperf\\ExceptionHandler\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/exception-handler/src',
         ),
-        'Hyperf\\Event\\' => 
-        array (
+        'Hyperf\\Event\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/event/src',
         ),
-        'Hyperf\\Engine\\Contract\\' => 
-        array (
+        'Hyperf\\Engine\\Contract\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/engine-contract/src',
         ),
-        'Hyperf\\Engine\\' => 
-        array (
+        'Hyperf\\Engine\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/engine/src',
         ),
-        'Hyperf\\Dispatcher\\' => 
-        array (
+        'Hyperf\\Dispatcher\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/dispatcher/src',
         ),
-        'Hyperf\\Di\\' => 
-        array (
+        'Hyperf\\Di\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/di/src',
         ),
-        'Hyperf\\Devtool\\' => 
-        array (
+        'Hyperf\\Devtool\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/devtool/src',
         ),
-        'Hyperf\\DbConnection\\' => 
-        array (
+        'Hyperf\\DbConnection\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/db-connection/src',
         ),
-        'Hyperf\\Database\\' => 
-        array (
+        'Hyperf\\Database\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/database/src',
         ),
-        'Hyperf\\Coroutine\\' => 
-        array (
+        'Hyperf\\Coroutine\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/coroutine/src',
         ),
-        'Hyperf\\Coordinator\\' => 
-        array (
+        'Hyperf\\Coordinator\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/coordinator/src',
         ),
-        'Hyperf\\Contract\\' => 
-        array (
+        'Hyperf\\Contract\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/contract/src',
         ),
-        'Hyperf\\Context\\' => 
-        array (
+        'Hyperf\\Context\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/context/src',
         ),
-        'Hyperf\\Consul\\' => 
-        array (
+        'Hyperf\\Consul\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/consul/src',
         ),
-        'Hyperf\\Constants\\' => 
-        array (
+        'Hyperf\\Constants\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/constants/src',
         ),
-        'Hyperf\\Config\\' => 
-        array (
+        'Hyperf\\Config\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/config/src',
         ),
-        'Hyperf\\ConfigNacos\\' => 
-        array (
+        'Hyperf\\ConfigNacos\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/config-nacos/src',
         ),
-        'Hyperf\\ConfigCenter\\' => 
-        array (
+        'Hyperf\\ConfigCenter\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/config-center/src',
         ),
-        'Hyperf\\Conditionable\\' => 
-        array (
+        'Hyperf\\Conditionable\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/conditionable/src',
         ),
-        'Hyperf\\Command\\' => 
-        array (
+        'Hyperf\\Command\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/command/src',
         ),
-        'Hyperf\\Collection\\' => 
-        array (
+        'Hyperf\\Collection\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/collection/src',
         ),
-        'Hyperf\\Codec\\' => 
-        array (
+        'Hyperf\\Codec\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/codec/src',
         ),
-        'Hyperf\\CodeParser\\' => 
-        array (
+        'Hyperf\\CodeParser\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/code-parser/src',
         ),
-        'Hyperf\\Cache\\' => 
-        array (
+        'Hyperf\\Cache\\' => array(
             0 => __DIR__ . '/..' . '/hyperf/cache/src',
         ),
-        'HyperfTest\\' => 
-        array (
+        'HyperfTest\\' => array(
             0 => __DIR__ . '/../..' . '/test',
         ),
-        'GuzzleHttp\\Psr7\\' => 
-        array (
+        'GuzzleHttp\\Psr7\\' => array(
             0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
         ),
-        'GuzzleHttp\\Promise\\' => 
-        array (
+        'GuzzleHttp\\Promise\\' => array(
             0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
         ),
-        'GuzzleHttp\\' => 
-        array (
+        'GuzzleHttp\\' => array(
             0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
         ),
-        'GrahamCampbell\\ResultType\\' => 
-        array (
+        'GrahamCampbell\\ResultType\\' => array(
             0 => __DIR__ . '/..' . '/graham-campbell/result-type/src',
         ),
-        'Fig\\Http\\Message\\' => 
-        array (
+        'Fig\\Http\\Message\\' => array(
             0 => __DIR__ . '/..' . '/fig/http-message-util/src',
         ),
-        'Fidry\\CpuCoreCounter\\' => 
-        array (
+        'Fidry\\CpuCoreCounter\\' => array(
             0 => __DIR__ . '/..' . '/fidry/cpu-core-counter/src',
         ),
-        'FastRoute\\' => 
-        array (
+        'FastRoute\\' => array(
             0 => __DIR__ . '/..' . '/nikic/fast-route/src',
         ),
-        'Evenement\\' => 
-        array (
+        'Evenement\\' => array(
             0 => __DIR__ . '/..' . '/evenement/evenement/src',
         ),
-        'Dotenv\\' => 
-        array (
+        'Dotenv\\' => array(
             0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
         ),
-        'Doctrine\\Instantiator\\' => 
-        array (
+        'Doctrine\\Instantiator\\' => array(
             0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
         ),
-        'Doctrine\\Inflector\\' => 
-        array (
+        'Doctrine\\Inflector\\' => array(
             0 => __DIR__ . '/..' . '/doctrine/inflector/lib/Doctrine/Inflector',
         ),
-        'Doctrine\\Common\\Lexer\\' => 
-        array (
+        'Doctrine\\Common\\Lexer\\' => array(
             0 => __DIR__ . '/..' . '/doctrine/lexer/src',
         ),
-        'Doctrine\\Common\\Annotations\\' => 
-        array (
+        'Doctrine\\Common\\Annotations\\' => array(
             0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations',
         ),
-        'DeepCopy\\' => 
-        array (
+        'DeepCopy\\' => array(
             0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
         ),
-        'Composer\\XdebugHandler\\' => 
-        array (
+        'Composer\\XdebugHandler\\' => array(
             0 => __DIR__ . '/..' . '/composer/xdebug-handler/src',
         ),
-        'Composer\\Semver\\' => 
-        array (
+        'Composer\\Semver\\' => array(
             0 => __DIR__ . '/..' . '/composer/semver/src',
         ),
-        'Composer\\Pcre\\' => 
-        array (
+        'Composer\\Pcre\\' => array(
             0 => __DIR__ . '/..' . '/composer/pcre/src',
         ),
-        'Clue\\React\\NDJson\\' => 
-        array (
+        'Clue\\React\\NDJson\\' => array(
             0 => __DIR__ . '/..' . '/clue/ndjson-react/src',
         ),
-        'Carbon\\Doctrine\\' => 
-        array (
+        'Carbon\\Doctrine\\' => array(
             0 => __DIR__ . '/..' . '/carbonphp/carbon-doctrine-types/src/Carbon/Doctrine',
         ),
-        'Carbon\\' => 
-        array (
+        'Carbon\\' => array(
             0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon',
         ),
-        'App\\' => 
-        array (
+        'App\\' => array(
             0 => __DIR__ . '/../..' . '/app',
         ),
     );
 
-    public static $classMap = array (
+    public static $classMap = array(
         'App\\Constants\\ErrorCode' => __DIR__ . '/../..' . '/app/Constants/ErrorCode.php',
         'App\\Controller\\AbstractController' => __DIR__ . '/../..' . '/app/Controller/AbstractController.php',
         'App\\Controller\\IndexController' => __DIR__ . '/../..' . '/app/Controller/IndexController.php',
@@ -714,7 +584,6 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'App\\Model\\Model' => __DIR__ . '/../..' . '/app/Model/Model.php',
         'App\\Model\\Template' => __DIR__ . '/../..' . '/app/Model/Template.php',
         'App\\Model\\TemplateClass' => __DIR__ . '/../..' . '/app/Model/TemplateClass.php',
-        'App\\Model\\User' => __DIR__ . '/../..' . '/app/Model/User.php',
         'App\\Model\\UserLevel' => __DIR__ . '/../..' . '/app/Model/UserLevel.php',
         'App\\Model\\Website' => __DIR__ . '/../..' . '/app/Model/Website.php',
         'App\\Model\\WebsiteCategory' => __DIR__ . '/../..' . '/app/Model/WebsiteCategory.php',
@@ -1987,6 +1856,16 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'Hyperf\\Nacos\\Provider\\InstanceProvider' => __DIR__ . '/..' . '/hyperf/nacos/src/Provider/InstanceProvider.php',
         'Hyperf\\Nacos\\Provider\\OperatorProvider' => __DIR__ . '/..' . '/hyperf/nacos/src/Provider/OperatorProvider.php',
         'Hyperf\\Nacos\\Provider\\ServiceProvider' => __DIR__ . '/..' . '/hyperf/nacos/src/Provider/ServiceProvider.php',
+        'Hyperf\\Paginator\\AbstractCursorPaginator' => __DIR__ . '/..' . '/hyperf/paginator/src/AbstractCursorPaginator.php',
+        'Hyperf\\Paginator\\AbstractPaginator' => __DIR__ . '/..' . '/hyperf/paginator/src/AbstractPaginator.php',
+        'Hyperf\\Paginator\\ConfigProvider' => __DIR__ . '/..' . '/hyperf/paginator/src/ConfigProvider.php',
+        'Hyperf\\Paginator\\Contract\\CursorPaginator' => __DIR__ . '/..' . '/hyperf/paginator/src/Contract/CursorPaginator.php',
+        'Hyperf\\Paginator\\Cursor' => __DIR__ . '/..' . '/hyperf/paginator/src/Cursor.php',
+        'Hyperf\\Paginator\\CursorPaginator' => __DIR__ . '/..' . '/hyperf/paginator/src/CursorPaginator.php',
+        'Hyperf\\Paginator\\LengthAwarePaginator' => __DIR__ . '/..' . '/hyperf/paginator/src/LengthAwarePaginator.php',
+        'Hyperf\\Paginator\\Listener\\PageResolverListener' => __DIR__ . '/..' . '/hyperf/paginator/src/Listener/PageResolverListener.php',
+        'Hyperf\\Paginator\\Paginator' => __DIR__ . '/..' . '/hyperf/paginator/src/Paginator.php',
+        'Hyperf\\Paginator\\UrlWindow' => __DIR__ . '/..' . '/hyperf/paginator/src/UrlWindow.php',
         'Hyperf\\Pipeline\\Pipeline' => __DIR__ . '/..' . '/hyperf/pipeline/src/Pipeline.php',
         'Hyperf\\Pool\\Channel' => __DIR__ . '/..' . '/hyperf/pool/src/Channel.php',
         'Hyperf\\Pool\\ConfigProvider' => __DIR__ . '/..' . '/hyperf/pool/src/ConfigProvider.php',
@@ -5199,7 +5078,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     );
 
-    public static function getInitializer(ClassLoader $loader)
+    function(public static getInitializerClassLoader $loader)
     {
         return \Closure::bind(function () use ($loader) {
             $loader->prefixLengthsPsr4 = ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654::$prefixLengthsPsr4;

+ 71 - 0
vendor/composer/installed.json

@@ -3907,6 +3907,77 @@
             ],
             "install-path": "../hyperf/nacos"
         },
+        {
+            "name": "hyperf/paginator",
+            "version": "v3.1.42",
+            "version_normalized": "3.1.42.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/hyperf/paginator.git",
+                "reference": "b637a3deeee69f4a3e5a6d62ab8214244b98412a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/hyperf/paginator/zipball/b637a3deeee69f4a3e5a6d62ab8214244b98412a",
+                "reference": "b637a3deeee69f4a3e5a6d62ab8214244b98412a",
+                "shasum": ""
+            },
+            "require": {
+                "hyperf/contract": "~3.1.0",
+                "hyperf/support": "~3.1.0",
+                "hyperf/utils": "~3.1.0",
+                "php": ">=8.1"
+            },
+            "suggest": {
+                "hyperf/event": "Reqiured to use PageResolverListener.",
+                "hyperf/framework": "Reqiured to use PageResolverListener.",
+                "hyperf/http-server": "Reqiured to use PageResolverListener."
+            },
+            "time": "2024-09-25T02:54:12+00:00",
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.1-dev"
+                },
+                "hyperf": {
+                    "config": "Hyperf\\Paginator\\ConfigProvider"
+                }
+            },
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Hyperf\\Paginator\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A paginator component for hyperf.",
+            "homepage": "https://hyperf.io",
+            "keywords": [
+                "hyperf",
+                "paginator",
+                "php"
+            ],
+            "support": {
+                "docs": "https://hyperf.wiki",
+                "issues": "https://github.com/hyperf/hyperf/issues",
+                "pull-request": "https://github.com/hyperf/hyperf/pulls",
+                "source": "https://github.com/hyperf/hyperf"
+            },
+            "funding": [
+                {
+                    "url": "https://hyperf.wiki/#/zh-cn/donate",
+                    "type": "custom"
+                },
+                {
+                    "url": "https://opencollective.com/hyperf",
+                    "type": "open_collective"
+                }
+            ],
+            "install-path": "../hyperf/paginator"
+        },
         {
             "name": "hyperf/pipeline",
             "version": "v3.1.15",

+ 15 - 2
vendor/composer/installed.php

@@ -3,7 +3,9 @@
         'name' => 'hyperf/hyperf-skeleton',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => '1fe33f07a9f0881e84bbed5dcdc1bed204735344',
+
+        'reference' => '9272eb0d9f1d349196e0347d0de7258b37674dc9',
+
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -439,7 +441,9 @@
         'hyperf/hyperf-skeleton' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => '1fe33f07a9f0881e84bbed5dcdc1bed204735344',
+
+            'reference' => '9272eb0d9f1d349196e0347d0de7258b37674dc9',
+
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
@@ -508,6 +512,15 @@
             'aliases' => array(),
             'dev_requirement' => false,
         ),
+        'hyperf/paginator' => array(
+            'pretty_version' => 'v3.1.42',
+            'version' => '3.1.42.0',
+            'reference' => 'b637a3deeee69f4a3e5a6d62ab8214244b98412a',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../hyperf/paginator',
+            'aliases' => array(),
+            'dev_requirement' => false,
+        ),
         'hyperf/pipeline' => array(
             'pretty_version' => 'v3.1.15',
             'version' => '3.1.15.0',