[游戏管理]压注订单

This commit is contained in:
2026-04-15 17:46:18 +08:00
parent 6bca594769
commit 92545067d2
7 changed files with 113 additions and 64 deletions

View File

@@ -1,6 +1,6 @@
<?php
namespace app\admin\controller\game;
namespace app\admin\controller\order;
use app\common\controller\Backend;
use support\think\Db;
@@ -22,11 +22,11 @@ class BetOrder extends Backend
protected string|array $orderGuarantee = ['id' => 'desc'];
protected array $withJoinTable = ['gameUser', 'channel', 'gamePeriod'];
protected array $withJoinTable = ['user', 'channel', 'gamePeriod'];
protected function initController(WebmanRequest $request): ?Response
{
$this->model = new \app\common\model\GameBetOrder();
$this->model = new \app\common\model\BetOrder();
return null;
}
@@ -87,7 +87,7 @@ class BetOrder extends Backend
->withJoin($this->withJoinTable, $this->withJoinType)
->with($this->withJoinTable)
->visible([
'gameUser' => ['username', 'phone'],
'user' => ['username', 'phone'],
'channel' => ['name'],
'gamePeriod' => ['period_no', 'status'],
])

View File

@@ -4,9 +4,9 @@ namespace app\common\model;
use support\think\Model;
class GameBetOrder extends Model
class BetOrder extends Model
{
protected $name = 'game_bet_order';
protected $name = 'bet_order';
protected $autoWriteTimestamp = true;
@@ -24,9 +24,9 @@ class GameBetOrder extends Model
'is_auto' => 'integer',
];
public function gameUser(): \think\model\relation\BelongsTo
public function user(): \think\model\relation\BelongsTo
{
return $this->belongsTo(GameUser::class, 'user_id', 'id');
return $this->belongsTo(User::class, 'user_id', 'id');
}
public function channel(): \think\model\relation\BelongsTo
@@ -39,3 +39,4 @@ class GameBetOrder extends Model
return $this->belongsTo(GamePeriod::class, 'period_id', 'id');
}
}