shish 6 år sedan
förälder
incheckning
ede0c53edc

+ 2 - 2
app/business/controllers/UserController.php

@@ -68,7 +68,7 @@ class UserController extends BaseController
 		UserService::valid($info, $this->merchantId);
 		UserService::valid($info, $this->merchantId);
 		util::success($info);
 		util::success($info);
 	}
 	}
-
+	
 	//添加客户,申请会员时会自动同步资产 shish 2019.11.30
 	//添加客户,申请会员时会自动同步资产 shish 2019.11.30
 	public function actionAdd()
 	public function actionAdd()
 	{
 	{
@@ -80,7 +80,7 @@ class UserController extends BaseController
 		AdminService::verifyConfirmPassword($this->adminId, $confirmPassword);
 		AdminService::verifyConfirmPassword($this->adminId, $confirmPassword);
 		
 		
 		$mobile = $post['mobile'];
 		$mobile = $post['mobile'];
-		$user = UserService::getByMobile($mobile);
+		$user = UserService::getByMobile($mobile, $this->merchantId);
 		if (!empty($user)) {
 		if (!empty($user)) {
 			util::fail('手机号已使用,客户已存在');
 			util::fail('手机号已使用,客户已存在');
 		}
 		}

+ 1 - 2
biz/user/classes/UserClass.php

@@ -74,9 +74,8 @@ class UserClass extends BaseClass
 	}
 	}
 	
 	
 	//根据手机号查询客户 shish 2019.12.1
 	//根据手机号查询客户 shish 2019.12.1
-	public static function getByMobile($mobile)
+	public static function getByMobile($mobile,$merchantId)
 	{
 	{
-		$merchantId = Yii::$app->params['merchantId'];
 		return self::getByCondition(['merchantId' => $merchantId, 'mobile' => $mobile]);
 		return self::getByCondition(['merchantId' => $merchantId, 'mobile' => $mobile]);
 	}
 	}
 	
 	

+ 2 - 2
biz/user/services/UserService.php

@@ -46,9 +46,9 @@ class UserService extends BaseService
 	}
 	}
 	
 	
 	//根据手机号查询客户 shish 2019.12.1
 	//根据手机号查询客户 shish 2019.12.1
-	public static function getByMobile($mobile)
+	public static function getByMobile($mobile,$merchantId)
 	{
 	{
-		return UserClass::getByMobile($mobile);
+		return UserClass::getByMobile($mobile,$merchantId);
 	}
 	}
 	
 	
 	/**
 	/**