wang hou sheng 7 months ago
parent e5ebce9ffc
commit 3944de3dc0
  1. 7
      app/store/model/store/shop/Clerk.php

@ -13,6 +13,7 @@ declare (strict_types=1);
namespace app\store\model\store\shop; namespace app\store\model\store\shop;
use app\common\model\store\shop\Clerk as ClerkModel; use app\common\model\store\shop\Clerk as ClerkModel;
use app\store\model\User;
/** /**
* 商家门店店员模型 * 商家门店店员模型
@ -147,6 +148,12 @@ class Clerk extends ClerkModel
$this->error = '该会员已经是该门店店员,无需重复添加'; $this->error = '该会员已经是该门店店员,无需重复添加';
return false; return false;
} }
//会员是否存在
$userInfo = User::detail($data['user_id']);
if (empty($userInfo->user_id)) {
$this->error = '会员不存在';
return false;
}
} }
if ($scene === self::FORM_SCENE_EDIT) { if ($scene === self::FORM_SCENE_EDIT) {
if ($data['shop_id'] != $detail['shop_id'] && self::isExistForShop($detail['user_id'], $data['shop_id'])) { if ($data['shop_id'] != $detail['shop_id'] && self::isExistForShop($detail['user_id'], $data['shop_id'])) {

Loading…
Cancel
Save