|
|
@@ -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]);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|