master
lion 5 days ago
parent 306e29867a
commit 668c7ba8b7

@ -174,9 +174,12 @@ class OtherController extends CommonController
$areasData = CourseSign::getAreaData($start_date, $end_date, 1, null, true, 'statistics'); $areasData = CourseSign::getAreaData($start_date, $end_date, 1, null, true, 'statistics');
$suzhou = []; $suzhou = [];
foreach ($areasData as $item) { foreach ($areasData as $item) {
$totalUnique = $item['total_unique'] ?? 0;
$suzhou[] = [ $suzhou[] = [
'area' => $item['area'], 'area' => $item['area'],
'total' => $item['total_unique'] ?? $item['total'] // 保持 total 兼容旧前端,同时显式返回 total_unique
'total' => $totalUnique,
'total_unique' => $totalUnique,
]; ];
} }

@ -10,7 +10,7 @@ use OwenIt\Auditing\Models\Audit;
class CourseSign extends SoftDeletesModel class CourseSign extends SoftDeletesModel
{ {
// 统计接口缓存时间(秒) // 统计接口缓存时间(秒)
const CACHE_TIME_STATISTICS = 600; // 10分钟 const CACHE_TIME_STATISTICS = 0; // 临时关闭统计缓存,便于核对数据
protected $casts = ['file_ids' => 'json', 'fee_file_ids' => 'json', 'data' => 'json', 'change_data' => 'json']; protected $casts = ['file_ids' => 'json', 'fee_file_ids' => 'json', 'data' => 'json', 'change_data' => 'json'];

Loading…
Cancel
Save