rkljw 2 miesięcy temu
rodzic
commit
3e95fe088d

+ 16 - 0
app/JsonRpc/UserService.php

@@ -7,6 +7,7 @@ use App\Model\RoleUser;
 use App\Model\User;
 use App\Model\UserInfo;
 use App\Model\UserLogin;
+use App\Model\WebsiteGroup;
 use App\Model\Wechat;
 use App\Tools\Result;
 use Hyperf\DbConnection\Db;
@@ -572,4 +573,19 @@ class UserService implements UserServiceInterface
             return Result::error("创建失败", 0);
         }
     }
+
+    /**
+     * 获取网站组信息
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteGroupInfo(array $data): array
+    {
+        $result = WebsiteGroup::where(['id'=>$data['id']])->first();
+        if ($result) {
+            return Result::success($result);
+        } else {
+            return Result::error('查询失败');
+        }
+    }
 }

+ 7 - 0
app/JsonRpc/UserServiceInterface.php

@@ -119,4 +119,11 @@ interface UserServiceInterface
     public function upUserStatus(array $data): array;
     public function updateUserAvatarNickname(array $data): array;
 
+    /**
+     * 获取网站组信息
+     * @param array $data
+     * @return array
+     */
+    public function getWebsiteGroupInfo(array $data): array;
+
 }

+ 28 - 0
app/Model/WebsiteGroup.php

@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+namespace App\Model;
+
+use Hyperf\DbConnection\Model\Model;
+
+/**
+ */
+class WebsiteGroup extends Model
+{
+    /**
+     * The table associated with the model.
+     */
+    protected ?string $table = 'website_group';
+
+    /**
+     * The attributes that are mass assignable.
+     */
+    protected array $fillable = [];
+
+    /**
+     * The attributes that should be cast to native types.
+     */
+    protected array $casts = [];
+
+}

+ 1 - 0
vendor/composer/autoload_classmap.php

@@ -29,6 +29,7 @@ return array(
     'App\\Model\\UserLogin' => $baseDir . '/app/Model/UserLogin.php',
     'App\\Model\\Website' => $baseDir . '/app/Model/Website.php',
     'App\\Model\\WebsiteColumn' => $baseDir . '/app/Model/WebsiteColumn.php',
+    'App\\Model\\WebsiteGroup' => $baseDir . '/app/Model/WebsiteGroup.php',
     'App\\Model\\WebsiteRoleUser' => $baseDir . '/app/Model/WebsiteRoleUser.php',
     'App\\Model\\Wechat' => $baseDir . '/app/Model/Wechat.php',
     'App\\Tools\\Result' => $baseDir . '/app/Tools/Result.php',

+ 1 - 0
vendor/composer/autoload_static.php

@@ -718,6 +718,7 @@ class ComposerStaticInit88f2a4d4a4e81dc7d415bcdf39930654
         'App\\Model\\UserLogin' => __DIR__ . '/../..' . '/app/Model/UserLogin.php',
         'App\\Model\\Website' => __DIR__ . '/../..' . '/app/Model/Website.php',
         'App\\Model\\WebsiteColumn' => __DIR__ . '/../..' . '/app/Model/WebsiteColumn.php',
+        'App\\Model\\WebsiteGroup' => __DIR__ . '/../..' . '/app/Model/WebsiteGroup.php',
         'App\\Model\\WebsiteRoleUser' => __DIR__ . '/../..' . '/app/Model/WebsiteRoleUser.php',
         'App\\Model\\Wechat' => __DIR__ . '/../..' . '/app/Model/Wechat.php',
         'App\\Tools\\Result' => __DIR__ . '/../..' . '/app/Tools/Result.php',