修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -85,7 +85,7 @@ class DiceLotteryPoolConfigController extends BaseController
$data = is_array($model) ? $model : $model->toArray();
return $this->success($data);
} else {
return $this->fail('未查找到信息');
return $this->fail('not found');
}
}
@@ -101,9 +101,9 @@ class DiceLotteryPoolConfigController extends BaseController
$this->validate('save', $data);
$result = $this->logic->add($data);
if ($result) {
return $this->success('添加成功');
return $this->success('add success');
} else {
return $this->fail('添加失败');
return $this->fail('add failed');
}
}
@@ -119,9 +119,9 @@ class DiceLotteryPoolConfigController extends BaseController
$this->validate('update', $data);
$result = $this->logic->edit($data['id'], $data);
if ($result) {
return $this->success('修改成功');
return $this->success('update success');
} else {
return $this->fail('修改失败');
return $this->fail('update failed');
}
}
@@ -135,13 +135,13 @@ class DiceLotteryPoolConfigController extends BaseController
{
$ids = $request->post('ids', '');
if (empty($ids)) {
return $this->fail('请选择要删除的数据');
return $this->fail('please select data to delete');
}
$result = $this->logic->destroy($ids);
if ($result) {
return $this->success('删除成功');
return $this->success('delete success');
} else {
return $this->fail('删除失败');
return $this->fail('delete failed');
}
}
@@ -149,7 +149,7 @@ class DiceLotteryPoolConfigController extends BaseController
* 获取当前彩金池Redis 实例化,无则按 type=0 创建)
* 返回含玩家累计盈利 profit_amount 实时值,供前端轮询展示
*/
#[Permission('色子奖池配置列表', 'dice:lottery_pool_config:index:index')]
#[Permission('色子奖池配置列表', 'dice:lottery_pool_config:index:getCurrentPool')]
public function getCurrentPool(Request $request): Response
{
$data = $this->logic->getCurrentPool();
@@ -159,21 +159,21 @@ class DiceLotteryPoolConfigController extends BaseController
/**
* 更新当前彩金池:仅可修改 safety_line、t1_weightt5_weight不可修改 profit_amount
*/
#[Permission('色子奖池配置修改', 'dice:lottery_pool_config:index:update')]
#[Permission('色子奖池配置修改', 'dice:lottery_pool_config:index:updateCurrentPool')]
public function updateCurrentPool(Request $request): Response
{
$data = $request->post();
$this->logic->updateCurrentPool($data);
return $this->success('保存成功');
return $this->success('save success');
}
/**
* 重置当前彩金池的玩家累计盈利:将 profit_amount 置为 0
*/
#[Permission('色子奖池配置修改', 'dice:lottery_pool_config:index:update')]
#[Permission('色子奖池配置修改', 'dice:lottery_pool_config:index:resetProfitAmount')]
public function resetProfitAmount(Request $request): Response
{
$this->logic->resetProfitAmount();
return $this->success('重置成功');
return $this->success('reset success');
}
}