From 3944de3dc077ecd9c4c4a81d06a5225ee1ffd46a Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:39:53 +0800 Subject: [PATCH] 1 --- app/store/model/store/shop/Clerk.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/store/model/store/shop/Clerk.php b/app/store/model/store/shop/Clerk.php index 445f1441..f6b47334 100644 --- a/app/store/model/store/shop/Clerk.php +++ b/app/store/model/store/shop/Clerk.php @@ -13,6 +13,7 @@ declare (strict_types=1); namespace app\store\model\store\shop; use app\common\model\store\shop\Clerk as ClerkModel; +use app\store\model\User; /** * 商家门店店员模型 @@ -147,6 +148,12 @@ class Clerk extends ClerkModel $this->error = '该会员已经是该门店店员,无需重复添加'; return false; } + //会员是否存在 + $userInfo = User::detail($data['user_id']); + if (empty($userInfo->user_id)) { + $this->error = '会员不存在'; + return false; + } } if ($scene === self::FORM_SCENE_EDIT) { if ($data['shop_id'] != $detail['shop_id'] && self::isExistForShop($detail['user_id'], $data['shop_id'])) {