shish 6 anos atrás
pai
commit
e01ce5391e
1 arquivos alterados com 5 adições e 6 exclusões
  1. 5 6
      biz/saas/classes/ApplyClass.php

+ 5 - 6
biz/saas/classes/ApplyClass.php

@@ -9,9 +9,9 @@ use biz\base\classes\BaseClass;
 
 class ApplyClass extends BaseClass
 {
-
+	
 	public static $baseFile = '\biz\saas\models\Apply';
-
+	
 	//添加申请 shish 2020.2.10
 	public static function addApply($data)
 	{
@@ -23,10 +23,9 @@ class ApplyClass extends BaseClass
 		if (!empty($apply)) {
 			util::fail('您已经申请过了');
 		}
-		$introMerchantId = isset($data['introMerchantId']) ? $data['introMerchantId'] : 0;
-		//有人邀请
-		if (!empty($introMerchantId)) {
-			
+		$apply = self::getByCondition(['userId' => $data['userId']]);
+		if (!empty($apply)) {
+			util::fail('您已经申请过了');
 		}
 		return self::add($data);
 	}