shish 6 лет назад
Родитель
Сommit
641e121b8d
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      biz/invite/services/InviteService.php

+ 4 - 1
biz/invite/services/InviteService.php

@@ -48,6 +48,9 @@ class InviteService extends BaseService
 		$deadline = $time + $gift['duration'] * 86400;
 		$prize = $gift['prize'];
 		$introduce = UserClass::getById($introUserId);
+		if (empty($introduce)) {
+			util::fail('没有找到介绍人');
+		}
 		$introMobile = $introduce['mobile'];
 		$introUserName = $introduce['userName'];
 		$data = ['userId' => $userId, 'introUserId' => $introUserId, 'introMobile' => $introMobile, 'introUserName' => $introUserName, 'prize' => $prize, 'addTime' => $time, 'merchantId' => $merchantId];
@@ -74,5 +77,5 @@ class InviteService extends BaseService
 		$couponId = $coupon['id'];
 		InviteClass::updateById($id, ['couponId' => $couponId]);
 	}
-
+	
 }