|
|
|
@ -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'])) { |
|
|
|
|