feat(admin-frontend): 补齐用户节点与订单运营工作台
新增用户高级筛选、批量操作与更多行级动作,支持邮件、 CSV、封禁恢复、订单分配、邀请查看、流量记录与重置流量 增强节点管理页的分页、父子筛选、跨页勾选、批量修改与 单节点置顶,并补齐后端批量更新 host、group_ids、rate 修复订单佣金状态误判问题,新增真实佣金筛选与行级确认, 同时优化仪表盘排行悬浮详情展示 补充 admin-frontend 独立 Dockerfile、Caddy 配置与 GHCR 发布工作流,支持通过独立镜像部署管理前端
This commit is contained in:
@@ -227,6 +227,10 @@ class ManageController extends Controller
|
||||
'show' => 'nullable|integer|in:0,1',
|
||||
'enabled' => 'nullable|boolean',
|
||||
'machine_id' => 'nullable|integer',
|
||||
'host' => 'sometimes|required|string',
|
||||
'rate' => 'sometimes|required|numeric|min:0.01',
|
||||
'group_ids' => 'sometimes|array',
|
||||
'group_ids.*' => 'integer',
|
||||
]);
|
||||
|
||||
$ids = $params['ids'];
|
||||
@@ -244,6 +248,15 @@ class ManageController extends Controller
|
||||
if (array_key_exists('machine_id', $params)) {
|
||||
$update['machine_id'] = $params['machine_id'] ?: null;
|
||||
}
|
||||
if (array_key_exists('host', $params)) {
|
||||
$update['host'] = trim((string) $params['host']);
|
||||
}
|
||||
if (array_key_exists('rate', $params)) {
|
||||
$update['rate'] = (float) $params['rate'];
|
||||
}
|
||||
if (array_key_exists('group_ids', $params)) {
|
||||
$update['group_ids'] = $params['group_ids'];
|
||||
}
|
||||
|
||||
if (empty($update)) {
|
||||
return $this->fail([400, '没有可更新的字段']);
|
||||
|
||||
@@ -627,6 +627,9 @@ class UserController extends Controller
|
||||
$scopeInfo = $this->resolveScope($request);
|
||||
$scope = $scopeInfo['scope'];
|
||||
$userIds = $scopeInfo['user_ids'];
|
||||
$banned = in_array((string) $request->input('banned', 1), ['0', '1'], true)
|
||||
? (int) $request->input('banned', 1)
|
||||
: 1;
|
||||
|
||||
if ($scope === 'selected') {
|
||||
if (empty($userIds)) {
|
||||
@@ -649,7 +652,7 @@ class UserController extends Controller
|
||||
|
||||
try {
|
||||
$builder->update([
|
||||
'banned' => 1
|
||||
'banned' => $banned
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e);
|
||||
|
||||
Reference in New Issue
Block a user