Tree 1 місяць тому
батько
коміт
13259cfd45

+ 3 - 2
app/Game/Services/AgentService.php

@@ -183,10 +183,11 @@ class AgentService
                 $GlobalUID='';
             }
         }
+        $h5link = env('H5_LINK', 'https://h5t.usgamewin.com/');
         if($ActName=='WheelFree100') {
-            $link = 'https://240.lol/cw/' . self::encodeAct($GlobalUID, $ActName);
+            $link = $h5link . self::encodeAct($GlobalUID, $ActName);
         }else{
-            $link = 'https://240.lol/' . self::encodeAct($GlobalUID, $ActName);
+            $link = $h5link . self::encodeAct($GlobalUID, $ActName);
         }
         return $link;
     }

+ 1 - 1
app/Http/Controllers/Admin/RechargeController.php

@@ -861,7 +861,7 @@ class RechargeController extends Controller
             $pay_methods = (int)$request->pay_methods ?: 0;  // 支付方式位掩码
             
             $logic = new RechargeLogic();
-            $res = $logic->add($money, $status, $config_ids, $favorable_price, $give, $pay_methods);
+            $res = $logic->add($money, $status, '', $favorable_price, $give, $pay_methods);
             return apiReturnSuc();
         }
         return view('admin.recharge.add', ['list' => $list]);

+ 1 - 0
app/Http/Controllers/Game/LoginController.php

@@ -265,6 +265,7 @@ class LoginController extends Controller
     }
     public static function CheckTimeBonus(&$user)
     {
+        return;
         if(!$user)return;
         $outdatas=null;
         if($user['Channel']==99)return ;

+ 4 - 0
app/Http/Controllers/Game/PayRechargeController.php

@@ -643,6 +643,7 @@ class PayRechargeController extends Controller
             ->select('money', 'favorable_price', 'give','gear')
             ->orderBy('money', 'asc')
             ->where('status', 1)
+            ->where('in_shop', 1)
             ->get();
 
 //        $gear = \GuzzleHttp\json_encode($names);
@@ -732,4 +733,7 @@ class PayRechargeController extends Controller
     }
 
 
+
+
+
 }

+ 1 - 0
app/Http/Controllers/Game/RechargeController.php

@@ -31,6 +31,7 @@ class RechargeController
 
 
         $list = DB::table('agent.dbo.recharge_gear')
+            ->where('in_shop', 1)
             ->select('id','money','favorable_price','give','recommend','gear')
             ->orderBy('money', 'asc')->where('status', 1)->get();
 

+ 23 - 66
app/Services/OrderServices.php

@@ -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 ) {