[游戏管理]玩家钱包流水
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\game;
|
||||
namespace app\admin\controller\record;
|
||||
|
||||
use app\common\controller\Backend;
|
||||
use support\think\Db;
|
||||
@@ -22,11 +22,11 @@ class UserWalletRecord extends Backend
|
||||
|
||||
protected string|array $orderGuarantee = ['id' => 'desc'];
|
||||
|
||||
protected array $withJoinTable = ['gameUser', 'channel', 'operatorAdmin'];
|
||||
protected array $withJoinTable = ['user', 'channel', 'operatorAdmin'];
|
||||
|
||||
protected function initController(WebmanRequest $request): ?Response
|
||||
{
|
||||
$this->model = new \app\common\model\GameUserWalletRecord();
|
||||
$this->model = new \app\common\model\UserWalletRecord();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class UserWalletRecord extends Backend
|
||||
->withJoin($this->withJoinTable, $this->withJoinType)
|
||||
->with($this->withJoinTable)
|
||||
->visible([
|
||||
'gameUser' => ['username', 'phone'],
|
||||
'user' => ['username', 'phone'],
|
||||
'channel' => ['name'],
|
||||
'operatorAdmin' => ['username'],
|
||||
])
|
||||
@@ -5,11 +5,11 @@ namespace app\common\model;
|
||||
use support\think\Model;
|
||||
|
||||
/**
|
||||
* 玩家游戏币钱包流水(只增不改;余额变更须与 game_user.coin 条件更新同事务)
|
||||
* 用户钱包流水(原 game_user_wallet_record)
|
||||
*/
|
||||
class GameUserWalletRecord extends Model
|
||||
class UserWalletRecord extends Model
|
||||
{
|
||||
protected $name = 'game_user_wallet_record';
|
||||
protected $name = 'user_wallet_record';
|
||||
|
||||
protected $autoWriteTimestamp = false;
|
||||
|
||||
@@ -24,9 +24,9 @@ class GameUserWalletRecord extends Model
|
||||
'balance_after' => 'string',
|
||||
];
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user