AI 2 maanden geleden
bovenliggende
commit
80d6ec761a
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      app/JsonRpc/WebsiteService.php

+ 4 - 4
app/JsonRpc/WebsiteService.php

@@ -1077,15 +1077,15 @@ class WebsiteService implements WebsiteServiceInterface
     //20250212  网站标识
     public function addWebsiteGroup(array $data): array
     {
-        //添加信息
-        $result = WebsiteGroup::insertGetId($data);
-        var_dump($result);
+
         //判斷name是不是重复
         $websiteGroupInfo = WebsiteGroup::query()->where('name', $data['name'])->first();
         if (!empty($websiteGroupInfo)) {
             return Result::error("网站标识重复", 0);
         }
-
+        //添加信息
+        $result = WebsiteGroup::insertGetId($data);
+        var_dump($result);
         if (empty($result)) {
             return Result::error("创建失败", 0);
         } else {