|
@@ -1077,15 +1077,15 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
|
|
|
public function addWebsiteGroup(array $data): array
|
|
|
{
|
|
|
-
|
|
|
- $result = WebsiteGroup::insertGetId($data);
|
|
|
- var_dump($result);
|
|
|
+
|
|
|
|
|
|
$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 {
|