feat: 新增玩家管理与转账对账相关功能
1. 新增完整的后台玩家管理CRUD接口,包括列表、创建、详情、更新、删除 2. 新增转账订单冲正和人工处理功能,支持待对账订单状态变更 3. 扩展钱包流水和转账订单的状态支持,新增reversed、manually_processed等状态 4. 新增玩家API数据统一输出类,标准化玩家信息返回格式
This commit is contained in:
26
app/Http/Requests/Admin/AdminPlayerIndexRequest.php
Normal file
26
app/Http/Requests/Admin/AdminPlayerIndexRequest.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* 玩家列表查询请求。
|
||||
*
|
||||
* @see AdminPlayerIndexController
|
||||
*/
|
||||
final class AdminPlayerIndexRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'keyword' => ['sometimes', 'string', 'max:128'],
|
||||
'status' => ['sometimes', 'integer', 'in:0,1,2'],
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Admin/AdminPlayerStoreRequest.php
Normal file
30
app/Http/Requests/Admin/AdminPlayerStoreRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* 玩家创建请求。
|
||||
*
|
||||
* @see AdminPlayerStoreController
|
||||
*/
|
||||
final class AdminPlayerStoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'site_code' => ['required', 'string', 'max:64'],
|
||||
'site_player_id' => ['required', 'string', 'max:128'],
|
||||
'username' => ['nullable', 'string', 'max:128'],
|
||||
'nickname' => ['nullable', 'string', 'max:128'],
|
||||
'default_currency' => ['sometimes', 'string', 'max:16'],
|
||||
'status' => ['sometimes', 'integer', 'in:0,1,2'],
|
||||
];
|
||||
}
|
||||
}
|
||||
28
app/Http/Requests/Admin/AdminPlayerUpdateRequest.php
Normal file
28
app/Http/Requests/Admin/AdminPlayerUpdateRequest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
/**
|
||||
* 玩家更新请求。
|
||||
*
|
||||
* @see AdminPlayerUpdateController
|
||||
*/
|
||||
final class AdminPlayerUpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'username' => ['sometimes', 'string', 'max:128'],
|
||||
'nickname' => ['sometimes', 'nullable', 'string', 'max:128'],
|
||||
'status' => ['sometimes', 'integer', Rule::in([0, 1, 2])],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin\Wallet;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
final class TransferOrderManuallyProcessRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'remark' => ['sometimes', 'nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin\Wallet;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
final class TransferOrderReverseRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'remark' => ['sometimes', 'nullable', 'string', 'max:255'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user