2
0
Tree 15 годин тому
батько
коміт
e01fa77695

+ 1 - 0
app/Console/Commands/SuperballUpdatePoolAndStats.php

@@ -31,6 +31,7 @@ class SuperballUpdatePoolAndStats extends Command
 
     public function handle(): int
     {
+        return false;
         $today = Carbon::today();
         $dateStr = $today->format('Y-m-d');
         $dateId = $today->format('Ymd');

+ 1 - 1
app/Game/Banner.php

@@ -16,7 +16,7 @@ class Banner extends Model
     protected $primaryKey = 'bid';
 
     // 确定哪些字段可以被赋值
-    protected $fillable = ['img','img_pt','img_es', 'alt', 'link_game', 'link_module', 'theme_key'];
+    protected $fillable = ['img','img_pt','img_es', 'alt', 'link', 'state', 'link_game', 'link_module', 'theme_key'];
 
 
     // 隐藏不需要返回的字段

+ 12 - 2
app/Http/Controllers/Admin/BannerController.php

@@ -36,6 +36,8 @@ class BannerController
             $validator = Validator::make($request->all(), [
                 'img' => 'required|string',
                 'alt' => 'nullable|string',
+                'link' => 'nullable|string|max:255',
+                'state' => 'nullable|integer',
                 'link_game' => 'nullable|integer',
                 'link_module' => 'nullable|integer',
                 'theme_key' => 'nullable|string|max:30',
@@ -45,7 +47,10 @@ class BannerController
                 return apiReturnFail($validator->errors()->first());
             }
 
-            $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link_game', 'link_module', 'theme_key']);
+            $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link', 'state', 'link_game', 'link_module', 'theme_key']);
+            // state: 127 启用, 0 禁用
+            $state = isset($data['state']) && $data['state'] !== '' ? intval($data['state']) : 127;
+            $data['state'] = in_array($state, [0, 127]) ? $state : 127;
             Banner::create($data);
 
             return apiReturnSuc();
@@ -63,6 +68,8 @@ class BannerController
             $validator = Validator::make($request->all(), [
                 'img' => 'required|string',
                 'alt' => 'nullable|string',
+                'link' => 'nullable|string|max:255',
+                'state' => 'nullable|integer',
                 'link_game' => 'nullable|integer',
                 'link_module' => 'nullable|integer',
                 'theme_key' => 'nullable|string|max:30',
@@ -72,7 +79,10 @@ class BannerController
                 return apiReturnFail($validator->errors()->first());
             }
 
-            $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link_game', 'link_module', 'theme_key']);
+            $data = $request->only(['img', 'img_pt', 'img_es', 'alt', 'link', 'state', 'link_game', 'link_module', 'theme_key']);
+            // state: 127 启用, 0 禁用
+            $state = isset($data['state']) && $data['state'] !== '' ? intval($data['state']) : 127;
+            $data['state'] = in_array($state, [0, 127]) ? $state : 127;
             $info->update($data);
 
             return apiReturnSuc();

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

@@ -103,6 +103,8 @@ class PayRechargeController extends Controller
         $gear = Util::filterGearByDevice(\GuzzleHttp\json_encode($names));
         foreach ($list as &$val) {
             $val->favorable_price = $val->favorable_price + $val->give;
+            $val->favorable_price = (int)$val->favorable_price;
+            $val->money = (int)$val->money;
             $val->gear = $gear;
             $val->recommend = 0;
             if($val->money == $firstPayGift->recommend){
@@ -150,6 +152,8 @@ class PayRechargeController extends Controller
             
             foreach ($list as &$val) {
                 $val->favorable_price = $val->favorable_price + $val->give;
+                $val->favorable_price = (int)$val->favorable_price;
+                $val->money = (int)$val->money;
                 $val->recommend = 0;
                 if ($val->money == $giftConfig->recommend) {
                     $val->recommend = 1;
@@ -729,6 +733,8 @@ class PayRechargeController extends Controller
             if (!empty($val->gear)) {
                 $val->gear = Util::filterGearByDevice($val->gear);
             }
+            $val->favorable_price = intval($val->favorable_price);
+            $val->money = intval($val->money);
         }
 
         return apiReturnSuc([
@@ -769,6 +775,8 @@ class PayRechargeController extends Controller
             ->where('second_give','>',0)
             ->where('first_pay','>=', 1)
             ->select('gift_id','money','give','favorable_price','second_give')->get()->each(function($item){
+                $item->money = (int)$item->money;
+                $item->favorable_price = (int)$item->favorable_price;
                 $item->id=28;
             })->toArray();
         $default=count($items)-1;
@@ -810,6 +818,8 @@ class PayRechargeController extends Controller
                 ->first();
             
             if ($gear) {
+                $gear->money = (int)$gear->money;
+                $gear->favorable_price = (int)$gear->favorable_price;
                 $gear->gift_id = $gift->gift_id;
                 $gear->total_bonus = $gift->total_bonus;
                 $gear->bonus = $gift->total_bonus - 100;
@@ -874,6 +884,8 @@ class PayRechargeController extends Controller
                 ->first();
             
             if ($gear) {
+                $gear->money = (int)$gear->money;
+                $gear->favorable_price = (int)$gear->favorable_price;
                 $gear->gift_id = $gift->gift_id;
                 $gear->total_bonus = $gift->total_bonus;
                 $gear->bonus = $gift->total_bonus - 100;
@@ -942,6 +954,8 @@ class PayRechargeController extends Controller
                 ->first();
             
             if ($gear) {
+                $gear->money = (int)$gear->money;
+                $gear->favorable_price = (int)$gear->favorable_price;
                 // 检查该档位今日是否已充值(使用浮点数比较,允许小数点精度差异)
                 $isCompleted = false;
                 foreach ($todayRecharges as $rechargeAmount) {
@@ -1304,6 +1318,8 @@ class PayRechargeController extends Controller
             $give = $favorablePrice - $amount;
 
             if ($gear) {
+                $gear->money = (int)$gear->money;
+                $gear->favorable_price = (int)$gear->favorable_price;
                 $gear->gift_id = 305;
                 $gear->favorable_price = $favorablePrice;
                 $gear->give = $give;

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

@@ -39,6 +39,8 @@ class RechargeController
             if (!empty($item->gear)) {
                 $item->gear = Util::filterGearByDevice($item->gear);
             }
+            $item->money = intval($item->money);
+            $item->favorable_price = intval($item->favorable_price);
         }
 
         return apiReturnSuc(['list'=>$list,'bonus_show'=>false]);

+ 1 - 1
app/Http/Controllers/Game/WebRouteController.php

@@ -151,7 +151,7 @@ class WebRouteController extends Controller
         $firstBonus=1;
         if(env('CONFIG_24680_NFTD_99',0)==0)if($config->Channel==99)$firstBonus=0;
 
-        $registerBonus = SystemStatusInfo::OnlyGetCacheValue('GrantScoreCountNew') ?? 1000;
+        $registerBonus = SystemStatusInfo::OnlyGetCacheValue('GrantScoreCount') ?? 30000;
 
         $chat = DB::connection('write')->table('QPAccountsDB.dbo.SystemStatusInfo')
             ->where('StatusName', 'Telegram')

+ 8 - 0
resources/views/admin/banner/add.blade.php

@@ -31,6 +31,14 @@
                                     <label>Alt Text</label>
                                     <input type="text" class="form-control" name="alt">
                                 </div>
+                                <div class="form-group">
+                                    <label>Link</label>
+                                    <input type="text" class="form-control" name="link">
+                                </div>
+                                <div class="form-group">
+                                    <label>State</label>
+                                    <input type="text" class="form-control" name="state" value="127">
+                                </div>
                                 <div class="form-group">
                                     <label>Link Game ID</label>
                                     <input type="number" class="form-control" name="link_game">

+ 8 - 0
resources/views/admin/banner/edit.blade.php

@@ -31,6 +31,14 @@
                                     <label>Alt Text</label>
                                     <input type="text" class="form-control" name="alt" value="{{$info->alt}}">
                                 </div>
+                                <div class="form-group">
+                                    <label>Link</label>
+                                    <input type="text" class="form-control" name="link" value="{{$info->link}}">
+                                </div>
+                                <div class="form-group">
+                                    <label>State</label>
+                                    <input type="text" class="form-control" name="state" value="{{$info->state}}">
+                                </div>
                                 <div class="form-group">
                                     <label>Link Game ID</label>
                                     <input type="number" class="form-control" name="link_game" value="{{$info->link_game}}">

+ 16 - 12
resources/views/admin/banner/index.blade.php

@@ -45,17 +45,19 @@
                             </form>
 
                             <table class="table table-bordered">
-                                <thead>
-                                <tr>
-                                    <th>ID</th>
-                                    <th>{{ __('auto.图片') }}</th>
-                                    <th>Alt</th>
-                                    <th>Link Game</th>
-                                    <th>Link Module</th>
-                                    <th>{{ __('auto.主题KEY') }}</th>
-                                    <th>{{ __('auto.操作') }}</th>
-                                </tr>
-                                </thead>
+                            <thead>
+                            <tr>
+                                <th>ID</th>
+                                <th>{{ __('auto.图片') }}</th>
+                                <th>Alt</th>
+                                <th>Link</th>
+                                <th>State</th>
+                                <th>Link Game</th>
+                                <th>Link Module</th>
+                                <th>{{ __('auto.主题KEY') }}</th>
+                                <th>{{ __('auto.操作') }}</th>
+                            </tr>
+                            </thead>
                                 <tbody>
                                 @foreach($list as $v)
                                     <tr>
@@ -65,7 +67,9 @@
                                                 <img src="{{$v->img}}" style="max-width: 200px; height: auto;" alt="Banner">
                                             @endif
                                         </td>
-                                        <td>{{$v->alt}}</td>
+                                    <td>{{$v->alt}}</td>
+                                    <td>{{$v->link}}</td>
+                                    <td>{{$v->state ?? 1}}</td>
                                         <td>{{$v->link_game}}</td>
                                         <td>{{$v->link_module}}</td>
                                         <td>{{$v->theme_key}}</td>