优化抽奖方式,以及记录相关信息
This commit is contained in:
@@ -12,7 +12,6 @@ use app\dice\logic\play_record\DicePlayRecordLogic;
|
||||
use app\dice\validate\play_record\DicePlayRecordValidate;
|
||||
use app\dice\model\player\DicePlayer;
|
||||
use app\dice\model\lottery_pool_config\DiceLotteryPoolConfig;
|
||||
use app\dice\model\reward\DiceRewardConfig;
|
||||
use plugin\saiadmin\service\Permission;
|
||||
use support\Request;
|
||||
use support\Response;
|
||||
@@ -57,7 +56,6 @@ class DicePlayRecordController extends BaseController
|
||||
AdminScopeHelper::applyAdminScope($query, $this->adminInfo ?? null);
|
||||
$query->with([
|
||||
'dicePlayer',
|
||||
'diceRewardConfig',
|
||||
'diceLotteryPoolConfig',
|
||||
]);
|
||||
|
||||
@@ -101,23 +99,6 @@ class DicePlayRecordController extends BaseController
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取奖励配置选项(id、ui_text、tier)
|
||||
*/
|
||||
#[Permission('玩家抽奖记录列表', 'dice:play_record:index:index')]
|
||||
public function getRewardConfigOptions(Request $request): Response
|
||||
{
|
||||
$list = DiceRewardConfig::field('id,ui_text,tier')->select();
|
||||
$data = $list->map(function ($item) {
|
||||
return [
|
||||
'id' => $item['id'],
|
||||
'ui_text' => $item['ui_text'] ?? '',
|
||||
'tier' => $item['tier'] ?? ''
|
||||
];
|
||||
})->toArray();
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取数据
|
||||
* @param Request $request
|
||||
|
||||
@@ -50,7 +50,7 @@ class DicePlayRecordTestController extends BaseController
|
||||
['roll_number', ''],
|
||||
]);
|
||||
$query = $this->logic->search($where);
|
||||
$query->with(['diceLotteryPoolConfig', 'diceRewardConfig']);
|
||||
$query->with(['diceLotteryPoolConfig']);
|
||||
|
||||
// 按当前筛选条件统计:平台总盈利 = 付费金额(paid_amount 求和) - 玩家总收益(win_coin 求和)
|
||||
$sumQuery = clone $query;
|
||||
|
||||
Reference in New Issue
Block a user