新增查看显示实时彩金池

This commit is contained in:
2026-03-10 16:41:11 +08:00
parent e56c3ada34
commit bc034727b0
6 changed files with 159 additions and 39 deletions

View File

@@ -135,4 +135,25 @@ class DiceLotteryConfigController extends BaseController
}
}
/**
* 获取当前彩金池Redis 实例化,无则按 type=0 创建)
* 返回含 profit_amount 实时值,供前端轮询展示
*/
#[Permission('色子奖池配置列表', 'dice:lottery_config:index:index')]
public function getCurrentPool(Request $request): Response
{
$data = $this->logic->getCurrentPool();
return $this->success($data);
}
/**
* 更新当前彩金池:仅可修改 safety_line、t1_weightt5_weight不可修改 profit_amount
*/
#[Permission('色子奖池配置修改', 'dice:lottery_config:index:update')]
public function updateCurrentPool(Request $request): Response
{
$data = $request->post();
$this->logic->updateCurrentPool($data);
return $this->success('保存成功');
}
}