|
|
@@ -15,12 +15,12 @@ class XrFlClass extends BaseClass
|
|
|
public static function giveGift($ghs, $custom)
|
|
|
{
|
|
|
$shopId = $ghs->shopId ?? 0;
|
|
|
- $flData = self::getAllByCondition(['shopId' => $shopId], null, '*');
|
|
|
+ $flData = self::getAllByCondition(['shopId' => $shopId], null, '*', null, true);
|
|
|
if (empty($flData)) {
|
|
|
util::fail('红包发完了');
|
|
|
}
|
|
|
|
|
|
- $ghsId = $item->id ?? 0;
|
|
|
+ $ghsId = $ghs->id ?? 0;
|
|
|
$ghsName = $ghs->name ?? '';
|
|
|
$ghsAvatar = $ghs->avatar ?? '';
|
|
|
$ghsSjId = $ghs->sjId ?? 0;
|
|
|
@@ -73,6 +73,10 @@ class XrFlClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ $ghs->sendNewGift = 1;
|
|
|
+ $ghs->save();
|
|
|
+ $custom->getNewGift = 1;
|
|
|
+ $custom->save();
|
|
|
}
|
|
|
|
|
|
}
|