|
|
@@ -198,50 +198,7 @@ class OrderServices
|
|
|
|
|
|
|
|
|
if ($payAmt > 0) {
|
|
|
- try {
|
|
|
- $userInfo = DB::table(TableName::QPAccountsDB() . 'AccountsInfo')
|
|
|
- ->where('UserID', $user_id)
|
|
|
- ->first();
|
|
|
- $channelConfig = DB::table('QPPlatformDB.dbo.ChannelPackageName')->where('Channel', $userInfo->Channel)->first();
|
|
|
-
|
|
|
-
|
|
|
-// Util::WriteLog('xxxxx', [$userInfo->Channel, $channelConfig, $query, $firstScore, $channelConfig->Rate > 0 && $channelConfig->ContrlScore > 0, $channelConfig->MinScore * NumConfig::NUM_VALUE > $firstScore]);
|
|
|
-
|
|
|
- if ($channelConfig && !$query && false) {
|
|
|
- if ($channelConfig->Rate > 0 && $channelConfig->ContrlScore > 0) {
|
|
|
- if ($channelConfig->MinScore * NumConfig::NUM_VALUE >= $firstScore) {
|
|
|
- $openGames = config('games.openKGame');
|
|
|
- $query = DB::table('QPTreasureDB.dbo.UserScoreControl')->where('UserID', $user_id)->first();
|
|
|
- if (!$query) {
|
|
|
- $build_sql = DB::connection('write')->table('QPTreasureDB.dbo.UserScoreControl');
|
|
|
- //Util::WriteLog('control_old_user',$list);
|
|
|
- $data = [
|
|
|
- 'ControlScore' => (int)($channelConfig->ContrlScore * NumConfig::NUM_VALUE),
|
|
|
- 'EffectiveScore' => 0,
|
|
|
- 'ControlKindID' => -1,
|
|
|
- 'Remarks' => '',
|
|
|
- 'InsertDate' => date('Y-m-d H:i:s'),
|
|
|
- 'ControlRadian' => 0
|
|
|
- ];
|
|
|
- $build_sql->updateOrInsert(['UserID' => $user_id], $data);
|
|
|
-
|
|
|
- foreach ($openGames as $GameID) {
|
|
|
- $KindData = [
|
|
|
- 'UserID' => $user_id,
|
|
|
- 'KindID' => $GameID,
|
|
|
- 'ControlRadian' => $channelConfig->Rate,
|
|
|
- 'ControlDate' => date('Y-m-d H:i:s')
|
|
|
- ];
|
|
|
- DB::connection('write')->table('QPTreasureDB.dbo.UserControlKind')->updateOrInsert(['UserID' => $user_id, 'KindID' => $GameID], $KindData);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (\Exception $exception) {
|
|
|
|
|
|
- }
|
|
|
// 记录订单变化后金币
|
|
|
DB::connection('write')->table('agent.dbo.order')
|
|
|
->where('order_sn', $order_sn)
|
|
|
@@ -264,32 +221,32 @@ class OrderServices
|
|
|
|
|
|
|
|
|
// 周卡 -- 执行存储过程
|
|
|
- if (isset($GiftsID) && $GiftsID > 100 && $GiftsID < 200) {
|
|
|
- $CardID = (int)$GiftsID - 100;
|
|
|
- StoredProcedure::BuyMonthCard($user_id, $CardID, $order_sn);
|
|
|
- // 开始执行时间
|
|
|
- $startTime = Helper::millisecond();
|
|
|
- Log::info('GSP_GP_BuyMonthCard 执行时间:' . ((Helper::millisecond() - $startTime) / 1000));
|
|
|
- }
|
|
|
+// if (isset($GiftsID) && $GiftsID > 100 && $GiftsID < 200) {
|
|
|
+// $CardID = (int)$GiftsID - 100;
|
|
|
+// StoredProcedure::BuyMonthCard($user_id, $CardID, $order_sn);
|
|
|
+// // 开始执行时间
|
|
|
+// $startTime = Helper::millisecond();
|
|
|
+// Log::info('GSP_GP_BuyMonthCard 执行时间:' . ((Helper::millisecond() - $startTime) / 1000));
|
|
|
+// }
|
|
|
|
|
|
|
|
|
//设置第二天要领取
|
|
|
- if (isset($GiftsID) && $GiftsID >= 200 && $GiftsID < 300 ) {
|
|
|
- $first = DB::table('agent.dbo.recharge_gear')->where('gift_id', $GiftsID)->select('gift_id', 'money', 'give', 'favorable_price', 'second_give')->first();
|
|
|
- if ($first && $first->second_give > 0) {
|
|
|
- $fpkey = 'Firstpay_' . $user_id;
|
|
|
- $data = (array)$first;
|
|
|
- $data['buytime'] = time();
|
|
|
- $data['czReason'] = $czReason;
|
|
|
- $data['cjReason'] = $cjReason;
|
|
|
- Redis::set($fpkey, json_encode($data));
|
|
|
- DB::table(TableName::agent() . 'guide_payment')->updateOrInsert([
|
|
|
- 'UserID' => $user_id,
|
|
|
- 'GiftID' => $GiftsID,
|
|
|
- 'CreateTime' => now()
|
|
|
- ], ['UserID' => $user_id]);
|
|
|
- }
|
|
|
- }
|
|
|
+// if (isset($GiftsID) && $GiftsID >= 200 && $GiftsID < 300 ) {
|
|
|
+// $first = DB::table('agent.dbo.recharge_gear')->where('gift_id', $GiftsID)->select('gift_id', 'money', 'give', 'favorable_price', 'second_give')->first();
|
|
|
+// if ($first && $first->second_give > 0) {
|
|
|
+// $fpkey = 'Firstpay_' . $user_id;
|
|
|
+// $data = (array)$first;
|
|
|
+// $data['buytime'] = time();
|
|
|
+// $data['czReason'] = $czReason;
|
|
|
+// $data['cjReason'] = $cjReason;
|
|
|
+// Redis::set($fpkey, json_encode($data));
|
|
|
+// DB::table(TableName::agent() . 'guide_payment')->updateOrInsert([
|
|
|
+// 'UserID' => $user_id,
|
|
|
+// 'GiftID' => $GiftsID,
|
|
|
+// 'CreateTime' => now()
|
|
|
+// ], ['UserID' => $user_id]);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
//设置第二天要领取
|
|
|
if (!empty($GiftsID) && $GiftsID >= 300 && $GiftsID < 400 ) {
|