feat: 收益全额直入商城余额、存量结转与奖项名称全局规范化对齐

这个提交包含在:
chen
2026-09-19 11:49:57 +08:00
父节点 85947e43ae
当前提交 aca0d3c671
共有 83 个文件被更改,包括 4146 次插入 和 443 次删除

查看文件

@@ -28,8 +28,10 @@ class Index extends Commission
->where('createtime', '>=', $monthStart)
->count();
$agent = IdentityService::attachAgent($this->service->agent);
$totalIncome = $agent['total_income'] ?? '0.00';
$this->success('ok', [
'total_income' => $totalIncome,
'month_income' => IdentityService::formatMoney($monthIncome),
'skip_count' => intval($skipCount),
'active_30d' => $agent['active_30d'] ?? true,
@@ -92,10 +94,21 @@ class Index extends Commission
}
}
$monthStart = strtotime(date('Y-m-01 00:00:00'));
$monthIncome = RewardModel::where('user_id', $userId)
->where('status', 1)
->where('createtime', '>=', $monthStart)
->whereIn('reward_type', array_merge(PartnerConfig::instantTypes(), ['venue_share', 'county_share']))
->sum('amount');
$agent = IdentityService::attachAgent($this->service->agent);
$totalIncome = $agent['total_income'] ?? '0.00';
$this->success('ok', [
'total' => $list->total(),
'per_page' => $list->listRows(),
'current_page' => $list->currentPage(),
'total_income' => $totalIncome,
'month_income' => IdentityService::formatMoney($monthIncome),
'data' => $rows,
'buyer_info' => $buyerInfo,
]);
@@ -127,6 +140,7 @@ class Index extends Commission
'madow' => $agent['madow'] ?? '0.00000000',
'madow_rate' => $agent['madow_rate'] ?? IdentityService::formatRate(null),
'madow_value' => $agent['madow_value'] ?? '0.00',
'show_madow_rate' => PartnerConfig::showMadowRate(),
'list' => $list,
]);
}