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