|
@@ -251,7 +251,7 @@ class UserService
|
|
|
$gift = model('Gift')->where($giftWhere)->find();
|
|
|
if (!empty($gift) && $inviteGiftNum > 0) {
|
|
|
$giftBack = [
|
|
|
- 'user_id' => $userId,
|
|
|
+ 'user_id' => $preUser['id'],
|
|
|
'gift_id' => $inviteGift,
|
|
|
'name' => $gift['name'],
|
|
|
'image' => $gift['image'],
|
|
@@ -260,7 +260,7 @@ class UserService
|
|
|
'number' => $inviteGiftNum,
|
|
|
'get_way' => 5,
|
|
|
];
|
|
|
- $giftBackRes = model()->insertGetId($giftBack);
|
|
|
+ $giftBackRes = model('GiftBack')->insertGetId($giftBack);
|
|
|
if (!$giftBackRes) {
|
|
|
throw new Exception('赠送礼物失败');
|
|
|
}
|