chore: 管理端与 API 批量更新(测评恢复、看板、分销与用户)
1、修复了用户详情/测评结果与人脸结果解析展示问题;管理端订单、分销及超管用户相关接口与展示异常。 2、新增了 testResultParse 统一解析工具、mbti_test_results 恢复 SQL 及生成脚本;补充 API 路由与 Dashboard/用户侧能力。 3、优化了企业/超管数据看板与分销结算逻辑;精简超管 Settings 与布局代码;完善 faceResultDetail;小程序 app.js 小幅同步。 Made-with: Cursor
This commit is contained in:
@@ -69,6 +69,10 @@ class Order extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
// 与列表相同筛选条件下的全量统计(非当前页):已支付/已完成单数、实收金额(分)
|
||||
$paidCompletedCount = (int) (clone $query)->whereIn('status', ['paid', 'completed'])->count();
|
||||
$totalRevenueFen = (int) (clone $query)->whereIn('status', ['paid', 'completed'])->sum('amount');
|
||||
|
||||
$query->order('createdAt', 'desc');
|
||||
$total = (int) (clone $query)->count();
|
||||
$list = (clone $query)->page($page, $pageSize)->select()->toArray();
|
||||
@@ -122,7 +126,16 @@ class Order extends BaseController
|
||||
$row['testData'] = $testsByOrder[$row['id']] ?? [];
|
||||
}
|
||||
|
||||
return paginate_response($list, $total, $page, $pageSize);
|
||||
return success([
|
||||
'list' => $list,
|
||||
'total' => $total,
|
||||
'page' => $page,
|
||||
'pageSize' => $pageSize,
|
||||
'hasMore' => ($page * $pageSize) < $total,
|
||||
// 看板卡片:全量口径(随 keyword / status / productType / 企业 筛选变化,与 total 一致)
|
||||
'paidCompletedCount' => $paidCompletedCount,
|
||||
'totalRevenueFen' => $totalRevenueFen,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user