lip 1 день назад
Родитель
Сommit
343f5deed9

+ 16 - 9
app/Http/Controllers/admin/LhcNumber.php

@@ -37,7 +37,7 @@ class LhcNumber extends Controller
                 }
         
                 // 三级:把数据放入 children
-                $tree[$item->game]['children'][$item->gameplay]['children'][] = ['id' => $item->id,'number' => $item->number, 'odds' => $item->odds];
+                $tree[$item->game]['children'][$item->gameplay]['children'][] = ['id' => $item->id,'number' => $item->number, 'odds' => $item->odds, 'maxinum' => $item->maxinum, 'mininum' => $item->mininum];
             }
         
             // 重新索引,返回纯数组结构
@@ -57,22 +57,29 @@ class LhcNumber extends Controller
                 'id' => ['nullable','integer'],
                 'game' => ['nullable','string'],
                 'gameplay' => ['nullable','string'],
-                'odds' => ['required','numeric']
+                'odds' => ['required','numeric'],
+                'maxinum' => ['required','numeric'],
+                'mininum' => ['required','numeric'],
             ]);
             $id = $params['id'] ?? 0;
             if ($id) {
                 $info = LhcNumberModel::where('id', $id)->first();
                 if (!$info) throw new Exception('数据不存在');
-            } else if (!empty($params['game']) && !empty($params['gameplay'])) {
-                $info = LhcNumberModel::where('game', $params['game'])->where('gameplay', $params['gameplay'])->first();
-                if (!$info) throw new Exception('数据不存在');
+                $info->odds = $params['odds'];
+                $info->maxinum = $params['maxinum'];
+                $info->mininum = $params['mininum'];
+                $info->updated_by = auth()->id();
+                $info->save();
+            } else if (!empty($params['game']) ) {
+                $where[] = ['game', $params['game']];
+                if (!empty($params['gameplay'])) {
+                    $where[] = ['gameplay', $params['gameplay']];
+                }
+                LhcNumberModel::where($where)->update(['odds' => $params['odds'], 'maxinum' => $params['maxinum'], 'mininum' => $params['mininum'], 'updated_by' => auth()->id()]);
             } else {
                 throw new Exception('参数错误');
             }
-
-            $info->odds = $params['odds'];
-            $info->updated_by = auth()->id();
-            $info->save();
+            
             return $this->success();
         } catch (Exception $e) {
             return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());

+ 1 - 1
app/Http/Controllers/admin/Operation.php

@@ -37,7 +37,7 @@ class Operation extends Controller
             }
 
             $count = $query->count();
-            $list = $query->join('wallets', 'users.user_id', '=', 'wallets.user_id')
+            $list = $query->join('wallets', 'users.member_id', '=', 'wallets.member_id')
                 ->select(['users.id', 'users.user_id','users.member_id', 'users.first_name', 'wallets.available_balance as money'])
                 ->forPage($page, $limit)
                 ->orderByDesc("users.created_at")

+ 148 - 0
app/Http/Controllers/admin/RechargeChannel.php

@@ -0,0 +1,148 @@
+<?php
+
+namespace App\Http\Controllers\admin;
+
+use App\Http\Controllers\Controller;
+use App\Models\RechargeChannel as RechargeChannelModel;
+use App\Models\RechargeChannelGroup;
+use Exception;
+use App\Constants\HttpStatus;
+
+class RechargeChannel extends Controller
+{
+
+    //获取充值方式
+    public function getChannel()
+    {
+        $channel = RechargeChannelModel::getChannel();
+        return $this->success(['total' => count($channel), 'data' => $channel]);
+    }
+
+    /**
+     * 充值通道组合列表
+     */
+    public function groupList()
+    {
+        try {
+            $page = request()->input('page', 1);
+            $limit = request()->input('limit', 15);
+
+            $query = new RechargeChannelGroup();
+            $count = $query->count();
+            $list = $query
+                ->forPage($page, $limit)
+                ->get();
+            foreach($list as &$item) {
+                $item->rechargeChannel = RechargeChannelModel::getChannel($item['type']);
+            }
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+        return $this->success(['total' => $count, 'data' => $list]);
+    }
+
+    /**
+     * 充值通道组合管理更新
+     */
+    public function updateGroup()
+    {
+        try {
+            $params = request()->validate([
+                'id' => ['nullable','integer'],
+                'name' => ['required','string'],
+                'type' => ['required','array'],
+            ]);
+            
+            $params['type'] = implode(',', $params['type']);
+            if (empty($params['id'])) {
+                RechargeChannelGroup::create($params);
+            } else {
+                $info = RechargeChannelGroup::where('id', $params['id'])->first();
+                if (!$info) throw new Exception('数据不存在');
+                $info->update($params);
+                $info->save();
+            }
+            
+            return $this->success();
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+    }
+
+    /**
+     * 充值通道管理列表
+     */
+    public function list()
+    {
+        try {
+            $params = request()->validate([
+                'page' => ['nullable', 'integer', 'min:1'],
+                'limit' => ['nullable', 'integer', 'min:1'],
+                'type' => ['nullable', 'string'],
+                'from' => ['nullable', 'integer'],
+                'key' => ['nullable', 'string'],
+                'name' => ['nullable', 'string'],
+            ]);
+            $page = request()->input('page', 1);
+            $limit = request()->input('limit', 15);
+
+            $query = new RechargeChannelModel();
+            if (!empty($params['type'])) {
+                $query = $query->where('type', $params['type']);
+            }
+            if (isset($params['from'])) {
+                $query = $query->where('from', $params['from']);
+            }
+            if (!empty($params['key'])) {
+                $query = $query->where('key', $params['key']);
+            }
+            if (!empty($params['name'])) {
+                $query = $query->where('name', 'like', '%'.$params['name'].'%');
+            }
+            $count = $query->count();
+            $list = $query
+                ->forPage($page, $limit)
+                ->orderBy('sort', 'asc')
+                ->get();
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+        return $this->success(['total' => $count, 'data' => $list]);
+    }
+
+    /**
+     * 充值通道管理更新
+     */
+    public function update()
+    {
+        try {
+            $params = request()->validate([
+                'id' => ['nullable','integer'],
+                'from' => ['nullable','integer'],
+                'key' => ['nullable','string'],
+                'name' => ['nullable','string'],
+                'type' => ['required','string'],
+                'rate' => ['required','numeric'],
+                'min' => ['nullable','integer'],
+                'max' => ['nullable','integer'],
+                'fixed' => ['nullable','string'],
+                'status' => ['nullable','integer'],
+                'sort' => ['nullable','integer'],
+            ]);
+
+            if (empty($params['id'])) {
+                RechargeChannelModel::create($params);
+            } else {
+                $info = RechargeChannelModel::where('id', $params['id'])->first();
+                if (!$info) throw new Exception('数据不存在');
+                $info->update($params);
+                $info->save();
+            }
+            
+            return $this->success();
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+    }
+
+}

+ 84 - 0
app/Http/Controllers/admin/Sport.php

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\admin;
 use App\Http\Controllers\Controller;
 use App\Models\Sport as SportModel;
 use App\Models\SportEvent;
+use App\Models\SportOdds;
 use App\Models\SportTeam;
 use App\Models\SportLeague;
 use App\Models\SportStatistics;
@@ -15,6 +16,89 @@ use App\Services\SportClientService;
 
 class Sport extends Controller
 {
+
+    /**
+     * 赛事玩法列表
+     */
+    public function oddsList()
+    {
+        try {
+            $params = request()->validate([
+                'page' => ['nullable', 'integer', 'min:1'],
+                'limit' => ['nullable', 'integer', 'min:1'],
+                'odd_name' => ['nullable'],
+            ]);
+            $page = request()->input('page', 1);
+            $limit = request()->input('limit', 15);
+
+            $query = new SportOdds();
+            $query = $query->whereNotNull('function_name');
+            if (!empty($params['odd_name'])) {
+                $odd_name = $params['odd_name'];
+                $query = $query->where(function ($query) use ($odd_name) {
+                    $query->where('odd_name', 'like', "%{$odd_name}%")
+                    ->orWhere('odd_name_en', 'like', "%{$odd_name}%");
+                });
+            }
+
+            $count = $query->count();
+            $list = $query
+                ->forPage($page, $limit)
+                ->get();
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+        return $this->success(['total' => $count, 'data' => $list]);
+    }
+
+    //设置赛事玩法的下注限额
+    public function setOdds()
+    {
+        try {
+            $params = request()->validate([
+                'id' => ['required'],
+                'maxinum' => ['required', 'numeric'],
+                'mininum' => ['required', 'numeric', 'min:1'],
+            ]);
+            
+            // 验证金额逻辑
+            if ($params['maxinum'] <= $params['mininum']) {
+                throw new Exception('最高下注限额必须大于最低下注限额');
+            }
+            
+            $id = $params['id'];
+            
+            // 构建查询
+            $query = SportOdds::query();
+            
+            if (is_array($id)) {
+                if (empty($id)) {
+                    throw new Exception('ID列表不能为空');
+                }
+                $query->whereIn('id', array_map('intval', $id));
+            } else {
+                if (!is_numeric($id) || $id <= 0) {
+                    throw new Exception('ID必须是有效的正整数');
+                }
+                $query->where('id', (int)$id);
+            }
+            
+            // 检查玩法是否存在
+            if (!$query->exists()) {
+                throw new Exception('玩法不存在');
+            }
+            
+            // 执行更新
+            $updated = $query->update([
+                'maxinum' => $params['maxinum'],
+                'mininum' => $params['mininum'],
+            ]);
+        
+            return $this->success();
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR,$e->getMessage());
+        }
+    }
     
     /**
      * 列表

+ 16 - 0
app/Http/Controllers/admin/User.php

@@ -194,4 +194,20 @@ class User extends Controller
 
     }
 
+    function setRechargeChannelGroup()
+    {
+        try {
+            $params = request()->validate([
+                'member_id' => ['required', 'array'],
+                'recharge_channel_group_id' => ['required', 'integer', 'min:1'],
+            ]);
+            UserModel::whereIn('member_id', $params['member_id'])->update(['recharge_channel_group_id' => $params['recharge_channel_group_id']]);
+        } catch (ValidationException $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
+        } catch (Exception $e) {
+            return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage());
+        }
+        return $this->success();
+    }
+
 }

+ 7 - 37
app/Http/Controllers/api/Wallet.php

@@ -11,8 +11,8 @@ use App\Models\Withdraw;
 use App\Models\User;
 use App\Models\Bank;
 use App\Models\Address;
+use App\Models\RechargeChannel;
 use App\Services\BalanceLogService;
-use App\Services\Payment\SanJinService;
 use App\Services\PaymentOrderService;
 use App\Services\QianBaoWithdrawService;
 use App\Services\Payment\QianBaoService;
@@ -33,43 +33,13 @@ class Wallet extends BaseController
     //获取三斤充值通道(微信、支付宝、扫码充值)
     public function getChannel()
     {
-        $data = SanJinService::getChannel();
-        $product = SanJinService::$PRODUCT;
-        $list = [];
-        foreach($data as $k => $v) {
-            $config = [];
-            foreach($product as $pv) {
-                if ($k == $pv['type']) {
-                    if ($config) {
-                        if (empty($config['range'])) {
-                            $config['range'][] = $config;
-                        }
-                        if ($pv['min'] < $config['min']) {
-                            $config['min'] = $pv['min'];
-                        } 
-                        if ($pv['max'] > $config['max']) {
-                            $config['max'] = $pv['max'];
-                        }
-                        if ($pv['rate'] < $config['rate']) {
-                            $config['max_rate'] = $config['rate'];
-                            $config['min_rate'] = $pv['rate'];
-                        }
-                        if ($pv['rate'] > $config['rate']) {
-                            $config['max_rate'] = $pv['rate'];
-                        }
-                        $config['range'][] = $pv;
-                    } else {
-                        $config = $pv;
-                    }
-                }
-            }
-            $list[] = [
-                'label' => lang($v),
-                'value' => $k,
-                'config' => $config ?? [],
-            ];
+        $member_id = request()->user->member_id;
+        if (empty(request()->user->recharge_channel_group_id)) {
+            $recharge_channel_group_id = User::where('member_id', $member_id)->value('recharge_channel_group_id');
+        } else {
+            $recharge_channel_group_id = request()->user->recharge_channel_group_id;
         }
-            
+        $list = RechargeChannel::getFormatChannel($recharge_channel_group_id);
         return $this->success([
             'list' => $list,
         ]);

+ 1 - 1
app/Models/LhcNumber.php

@@ -4,7 +4,7 @@ namespace App\Models;
 class LhcNumber extends BaseModel
 {
     protected $table = 'lhc_number';
-    protected $fillable = ['game','gameplay','number','odds','updated_by'];
+    protected $fillable = ['game','gameplay','number','odds', 'maxinum', 'mininum', 'updated_by'];
     
     public $timestamps = true;
     protected $dateFormat = 'U'; // U 代表 UNIX 时间戳(int)

+ 87 - 0
app/Models/RechargeChannel.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace App\Models;
+
+class RechargeChannel extends BaseModel
+{
+
+    protected $table = 'recharge_channel';
+    protected $fillable = ['id','key', 'name', 'type', 'rate','min','max' ,'fixed' ,'sort'];
+    protected $hidden = [];
+
+    public function getFixedAttribute($value)
+    {
+        return $value ? explode(',', $value) : null; 
+    }
+
+    public static function getChannel($type = [])
+    {
+        $query = self::where('status', 1);
+        if ($type) {
+            $query = $query->whereIn('type', $type);
+        }
+        $channel = $query->select(['type','name'])->get()->toArray();
+        $channel = array_column($channel, null, 'type');
+        return array_values($channel);
+    }
+
+    //获取充值通道
+    public static function product($from = '')
+    {
+        $where['status'] = 1;
+        if($from){
+            $where['from'] = $from;
+        }
+        $list = self::where($where)->orderBy('sort', 'asc')->get()->toArray();
+        return array_column($list, null, 'key');
+    }
+
+    public static function getFormatChannel($recharge_channel_group_id = '')
+    {
+        $query = self::where(['status' => 1]);
+        
+        if ($recharge_channel_group_id) {
+            $type = RechargeChannelGroup::where('id', $recharge_channel_group_id)->value('type');
+            if ($type) {
+                $query = $query->whereIn('type', $type);
+            }
+        }
+        $product = $query->orderBy('sort', 'asc')->select(['id','name','type','min','max','fixed','rate'])->get()->toArray();
+        
+        $list = [];
+        foreach($product as $key => $pv) {
+            if (isset($list[$pv['type']]['config'])) {
+                $config = $list[$pv['type']]['config'];
+                if (empty($config['range'])) {
+                    $config['range'][] = $config;
+                }
+                if ($pv['min'] < $config['min']) {
+                    $config['min'] = $pv['min'];
+                } 
+                if ($pv['max'] > $config['max']) {
+                    $config['max'] = $pv['max'];
+                }
+                if ($pv['rate'] < $config['rate']) {
+                    $config['max_rate'] = $config['rate'];
+                    $config['min_rate'] = $pv['rate'];
+                }
+                if ($pv['rate'] > $config['rate']) {
+                    $config['max_rate'] = $pv['rate'];
+                }
+                $config['range'][] = $pv;
+            } else {
+                $config = $pv;
+            }
+            
+            $list[$pv['type']] = [
+                'key' => $key,
+                'label' => lang($pv['name']),
+                'value' => $pv['type'],
+                'config' => $config ?? [],
+            ];
+        }
+        $list = array_column($list, null, 'key');
+    
+        return array_values($list);
+    }
+}

+ 23 - 0
app/Models/RechargeChannelGroup.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Models;
+
+class RechargeChannelGroup extends BaseModel
+{
+    protected $table = 'recharge_channel_group';
+    protected $fillable = ['name', 'type'];
+    protected $hidden = [];
+
+    // 修改器:将逗号分隔字符串转为数组
+    public function getTypeAttribute($value)
+    {
+        return $value ? explode(',', $value) : []; 
+    }
+
+    // 设置器:将数组转为逗号分隔字符串
+    public function setTypeAttribute($value)
+    {
+        $this->attributes['type'] = is_array($value) ? implode(',', $value) : $value;
+    }
+
+}

+ 2 - 0
app/Models/Sport.php

@@ -129,6 +129,8 @@ class Sport extends BaseModel
             }
             $item['name_en'] = $item['name'];
             $item['name'] = isset($sport_odds[$item['name']]) ? $sport_odds[$item['name']]['odd_name'] : $item['name'];
+            $item['maxinum'] = $sport_odds[$item['name']]['maxinum'] ?? 50000;
+            $item['mininum'] = $sport_odds[$item['name']]['mininum'] ?? 10;
             $new_odds[] = $item;
         }
         return $new_odds;

+ 2 - 2
app/Models/User.php

@@ -24,7 +24,7 @@ class User extends BaseModel
 {
     protected $table = 'users';
     protected $fillable = ['usdt', 'is_banned', 'last_active_time', 'visitor_id', 'register_ip', 'status', 'admin_note', 'member_id', 'first_name', 
-    'game_id', 'username', 'secret_key', 'secret_pass', 'language','user_code', 'agent_user_code','level'];
+    'game_id', 'username', 'secret_key', 'secret_pass', 'language','user_code', 'agent_user_code','level','recharge_channel_group_id'];
     protected $attributes = [
         'language' => 'zh',
     ];
@@ -60,7 +60,7 @@ class User extends BaseModel
 
     public function wallet()
     {
-        return $this->belongsTo(Wallet::class, 'user_id', 'user_id');
+        return $this->belongsTo(Wallet::class, 'member_id', 'member_id');
     }
 
     public function level()

+ 100 - 94
app/Services/Payment/SanJinService.php

@@ -7,6 +7,7 @@ use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Psr7\Response;
 use App\Services\BaseService;
 use Illuminate\Support\Facades\Lang;
+use App\Models\RechargeChannel;
 
 class SanJinService extends BaseService
 {
@@ -29,106 +30,110 @@ class SanJinService extends BaseService
      * @description: 获取支付频道
      * @return {*}
      */    
-    public static function getChannel($key = '')
+    public static function getChannel($type = '')
     {
-        
-        $channel = self::$CHANNEL;
-        if($key){
-            return Lang($channel[$key]);
-        }else{
-            foreach($channel as $k => $v){
-                $channel[$k] = lang($v);
+        if ($type) {
+            $name = RechargeChannel::where('type', $type)->value('name');
+            return Lang($name);
+        } else {
+            $channel = [];
+            $product = self::product();
+            foreach($product as $v){
+                $channel[$v['type']] = lang($v['name']);
             }
             return $channel;
         }
-        
     }
 
-    public static $PRODUCT = [
-        // 'T888' => [
-        //     'type' => 'test',
-        //     'rate' => 0.02,
-        //     'max' => 5000,
-        //     'min' => 10
-        // ],
-        'WX002' => [
-            'type' => 'wxsm',
-            'rate' => 0.095,
-            'max' => 3000,
-            'min' => 100
-        ],
-        'YL001' => [
-            'type' => 'ylsm',
-            'rate' => 0.05,
-            'max' => 500,
-            'min' => 50
-        ],
-        'SZ002' => [
-            'type' => 'szrmb',
-            'rate' => 0.05,
-            'max' => 100,
-            'min' => 10
-        ],
-        'SZ001' => [
-            'type' => 'szrmb',
-            'rate' => 0.048,
-            'max' => 5000,
-            'min' => 100
-        ],
-        'ZFB001' => [
-            'type' => 'zfbsm',
-            'rate' => 0.085,
-            'max' => 200,
-            'min' => 100
-        ],
-        'ZFB002' => [
-            'type' => 'zfbsm',
-            'rate' => 0.057,
-            'max' => 1000,
-            'min' => 200
-        ],
-        'ZFB003' => [
-            'type' => 'zfbsm',
-            'rate' => 0.052,
-            'max' => 3000,
-            'min' => 1000
-        ],
-        'ZFB004' => [
-            'type' => 'zfbsm',
-            'rate' => 0.042,
-            'max' => 20000,
-            'min' => 3000
-        ],
-        'ZFB005' => [
-            'type' => 'zfbge',
-            'rate' => 0.027,
-            'fixed' => [945 ,988 ,990]
-        ],
-        'ZFBZK001' => [
-            'type' => 'zfbzk',
-            'rate' => 0.05,
-            'max' => 2000,
-            'min' => 200
-        ],
-        'JT000' => [
-            'type' => 'sdjt',
-            'rate' => 0.08,
-            'max' => 300,
-            'min' => 100
-        ],
-        'JT001' => [
-            'type' => 'sdjt',
-            'rate' => 0.08,
-            'max' => 3000,
-            'min' => 300
-        ],
-        'JT002' => [
-            'type' => 'sdjt',
-            'rate' => 0.08,
-            'max' => 5000,
-            'min' => 500
-        ],
-    ];
+    // public static $PRODUCT = [
+    //     // 'T888' => [
+    //     //     'type' => 'test',
+    //     //     'rate' => 0.02,
+    //     //     'max' => 5000,
+    //     //     'min' => 10
+    //     // ],
+    //     'WX002' => [
+    //         'type' => 'wxsm',
+    //         'rate' => 0.095,
+    //         'max' => 3000,
+    //         'min' => 100
+    //     ],
+    //     'YL001' => [
+    //         'type' => 'ylsm',
+    //         'rate' => 0.05,
+    //         'max' => 500,
+    //         'min' => 50
+    //     ],
+    //     'SZ002' => [
+    //         'type' => 'szrmb',
+    //         'rate' => 0.05,
+    //         'max' => 100,
+    //         'min' => 10
+    //     ],
+    //     'SZ001' => [
+    //         'type' => 'szrmb',
+    //         'rate' => 0.048,
+    //         'max' => 5000,
+    //         'min' => 100
+    //     ],
+    //     'ZFB001' => [
+    //         'type' => 'zfbsm',
+    //         'rate' => 0.085,
+    //         'max' => 200,
+    //         'min' => 100
+    //     ],
+    //     'ZFB002' => [
+    //         'type' => 'zfbsm',
+    //         'rate' => 0.057,
+    //         'max' => 1000,
+    //         'min' => 200
+    //     ],
+    //     'ZFB003' => [
+    //         'type' => 'zfbsm',
+    //         'rate' => 0.052,
+    //         'max' => 3000,
+    //         'min' => 1000
+    //     ],
+    //     'ZFB004' => [
+    //         'type' => 'zfbsm',
+    //         'rate' => 0.042,
+    //         'max' => 20000,
+    //         'min' => 3000
+    //     ],
+    //     'ZFB005' => [
+    //         'type' => 'zfbge',
+    //         'rate' => 0.027,
+    //         'fixed' => [945 ,988 ,990]
+    //     ],
+    //     'ZFBZK001' => [
+    //         'type' => 'zfbzk',
+    //         'rate' => 0.05,
+    //         'max' => 2000,
+    //         'min' => 200
+    //     ],
+    //     'JT000' => [
+    //         'type' => 'sdjt',
+    //         'rate' => 0.08,
+    //         'max' => 300,
+    //         'min' => 100
+    //     ],
+    //     'JT001' => [
+    //         'type' => 'sdjt',
+    //         'rate' => 0.08,
+    //         'max' => 3000,
+    //         'min' => 300
+    //     ],
+    //     'JT002' => [
+    //         'type' => 'sdjt',
+    //         'rate' => 0.08,
+    //         'max' => 5000,
+    //         'min' => 500
+    //     ],
+    // ];
+    public static function product()
+    {
+        return RechargeChannel::product(1);
+    }
 
     // 获取商户ID
     public static function getMerchantId()
@@ -257,4 +262,5 @@ class SanJinService extends BaseService
     {
         return [];
     }
+
 }

+ 1 - 1
app/Services/PaymentOrderService.php

@@ -179,7 +179,7 @@ class PaymentOrderService extends BaseService
         $result['code'] = 0;
         $result['url'] = '';
         $channel = ''; // 支付的通道
-        $product = SanJinService::$PRODUCT;
+        $product = SanJinService::product();
         $max = 0;
         $min = 0;
         $rate = 0;

+ 1 - 1
app/Services/PcIssueService.php

@@ -17,7 +17,7 @@ class PcIssueService extends BaseService
 {
     public static string $MODEL = PcIssue::class;
 
-    const COUN_TDOWN = 90; //每轮开盘的时长(秒数)
+    const COUN_TDOWN = 75; //每轮开盘的时长(秒数)
     const FENG_PAN = 15; //提前15秒封盘
 
     public static function index(): void

+ 1 - 1
app/Services/SanJinRechargeService.php

@@ -76,7 +76,7 @@ class SanJinRechargeService extends BaseService
             Cache::put(get_step_key($chatId), StepStatus::INPUT_RECHARGE_SJ_MONEY);
 
             $paymentType = $k;
-            $product = SanJinService::$PRODUCT;
+            $product = SanJinService::product();
             $max = 0;
             $min = 0;
             $rate = 0;

+ 1 - 0
lang/en/messages.php

@@ -134,6 +134,7 @@ return [
     "vi" => "Vietnamese",
     "语言设置成功" => "Language set successfully",
     "请选择支付的通道" => "Please select the payment channel",
+    "USDT充值" => "USDT Recharge",
     "支付宝扫码" => "Alipay QR Code",
     "支付宝固额" => "Alipay Fixed Amount",
     "支付宝转卡" => "Alipay Transfer to Card",

+ 1 - 0
lang/vi/messages.php

@@ -134,6 +134,7 @@ return [
     "vi" => "Tiếng Việt",
     "语言设置成功" => "Cài đặt ngôn ngữ thành công",
     "请选择支付的通道" => "Vui lòng chọn kênh thanh toán",
+    "USDT充值" => "Nạp tiền USDT",
     "支付宝扫码" => "Quét mã Alipay",
     "支付宝固额" => "Số tiền cố định Alipay",
     "支付宝转卡" => "Chuyển thẻ Alipay",

+ 1 - 0
lang/zh/messages.php

@@ -134,6 +134,7 @@ return [
     "vi" => "越南语",
     "语言设置成功" => "语言设置成功",
     "请选择支付的通道" => "请选择支付的通道",
+    "USDT充值" => "USDT充值",
     "支付宝扫码" => "支付宝扫码",
     "支付宝固额" => "支付宝固额",
     "支付宝转卡" => "支付宝转卡",

+ 14 - 0
routes/admin.php

@@ -36,6 +36,7 @@ use App\Http\Controllers\admin\LhcLottery;
 use App\Http\Controllers\admin\Sport;
 use App\Http\Controllers\admin\Level;
 use App\Http\Controllers\admin\YueBao;
+use App\Http\Controllers\admin\RechargeChannel;
 
 Route::post('/login', [Admin::class, 'login']);
 Route::get('/test', [Wallet::class, 'test']);
@@ -197,6 +198,16 @@ Route::middleware(['admin.jwt'])->group(function () {
             Route::get("/bankList", [Wallet::class, 'bankList']);
             Route::get("/address", [Wallet::class, 'address']);
             Route::get("/withdrawChannel", [Wallet::class, 'withdrawChannel']);
+            Route::get("/getChannel", [Wallet::class, 'getChannel']);
+
+        });
+
+        Route::prefix('/rechargeChannel')->group(function () {
+            Route::get("/list", [RechargeChannel::class, 'list']);
+            Route::post("/update", [RechargeChannel::class, 'update']);
+            Route::get("/groupList", [RechargeChannel::class, 'groupList']);
+            Route::post("/updateGroup", [RechargeChannel::class, 'updateGroup']);
+            Route::get("/getChannel", [RechargeChannel::class, 'getChannel']);
 
         });
 
@@ -207,6 +218,7 @@ Route::middleware(['admin.jwt'])->group(function () {
             Route::post('/setNote', [User::class, 'setNote']);
             Route::post('/banned', [User::class, 'banned']);
             Route::get('/loginLog', [User::class, 'loginLog']);
+            Route::post('/setRechargeChannelGroup', [User::class, 'setRechargeChannelGroup']);
 
 
         });
@@ -263,6 +275,8 @@ Route::middleware(['admin.jwt'])->group(function () {
             Route::post('/setOddsLocked', [Sport::class, 'setOddsLocked']);
             Route::post('/getFixtures', [Sport::class, 'getFixtures']);
             Route::post('/setValuesLocked', [Sport::class, 'setValuesLocked']);
+            Route::post('/setOdds', [Sport::class, 'setOdds']);
+            Route::get('/oddsList', [Sport::class, 'oddsList']);
         });
 
         Route::prefix('/level')->group(function () {