|
|
@@ -28,6 +28,17 @@ class GhsController extends BaseController
|
|
|
if (stringUtil::getWordNum($name) > 8) {
|
|
|
util::fail('名称不能超过8个汉字');
|
|
|
}
|
|
|
+
|
|
|
+ $hasGhsList = GhsClass::getAllByCondition(['ownShopId' => $this->shopId], null, '*', null, true);
|
|
|
+ if (!empty($hasGhsList)) {
|
|
|
+ foreach ($hasGhsList as $hasGhs) {
|
|
|
+ $hasGhsName = $hasGhs->name ?? '';
|
|
|
+ if ($hasGhsName == $name) {
|
|
|
+ util::fail('名称已经存在了');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// $has = ApplyClass::getByCondition(['mobile' => $mobile, 'style' => SjClass::STYLE_KM_SUPPLIER]);
|
|
|
// if (!empty($has)) {
|
|
|
//
|