|
|
@@ -212,7 +212,13 @@ class OrderServices
|
|
|
$this->createInactiveVipGiftRecord($user_id, $payAmt);
|
|
|
}
|
|
|
|
|
|
- }else if ($GiftsID > 400) {
|
|
|
+ } else if ($GiftsID == 306) { // free bonus礼包
|
|
|
+ $Recharge = $payAmt;
|
|
|
+ $give = 0;
|
|
|
+ $favorable_price = $Recharge + $give;
|
|
|
+ $czReason = 50;
|
|
|
+ $cjReason = 51;
|
|
|
+ } else if ($GiftsID > 400) {
|
|
|
$Status = 1;
|
|
|
$recharge_gear = DB::connection('write')->table('agent.dbo.recharge_gear')->where('status', $Status)->where('money', $payAmt)->select('favorable_price', 'give')->first();
|
|
|
if(!$recharge_gear){
|
|
|
@@ -352,6 +358,20 @@ class OrderServices
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // free bonus 礼包:充值后赠送 InsureScore(单位为分)
|
|
|
+ if (in_array($GiftsID, [306]) && $payAmt > 0) {
|
|
|
+ $gift = DB::table('agent.dbo.recharge_gift')->lock('with(nolock)')
|
|
|
+ ->where(['gift_id' => $GiftsID, 'recommend' => $Recharge])
|
|
|
+ ->first();
|
|
|
+ if ($gift && $gift->task_bonus > 0) {
|
|
|
+ $bonus = (int) round($gift->task_bonus * NumConfig::NUM_VALUE);
|
|
|
+ if ($bonus > 0) {
|
|
|
+ DB::table('QPTreasureDB.dbo.GameScoreInfo')
|
|
|
+ ->where('UserID', $user_id)
|
|
|
+ ->increment('InsureScore', $bonus);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
$favorable_price = (int) round($favorable_price * NumConfig::NUM_VALUE) + ($vipSendChips ?? 0);
|
|
|
$firstScore = DB::connection('write')->table('QPTreasureDB.dbo.GameScoreInfo')->where('UserID', $user_id)->value('Score');
|
|
|
$Score = $favorable_price + $firstScore;
|