feat: 收益全额直入商城余额、存量结转与奖项名称全局规范化对齐
这个提交包含在:
@@ -153,7 +153,17 @@ class IdentityService
|
||||
}
|
||||
|
||||
$data = is_object($agent) ? $agent->toArray() : $agent;
|
||||
$userId = intval($data['user_id'] ?? 0);
|
||||
$agentTotalIncome = floatval($data['total_income'] ?? 0);
|
||||
$rewardCash = $userId > 0 ? \app\admin\model\shopro\partner\Reward::where('user_id', $userId)
|
||||
->where('status', 1)
|
||||
->where('amount', '>', 0)
|
||||
->sum('amount') : 0;
|
||||
$unifiedTotalIncome = max($agentTotalIncome, floatval($rewardCash));
|
||||
|
||||
return array_merge($data, $identity, [
|
||||
'total_income' => self::formatMoney($unifiedTotalIncome),
|
||||
'income_total_cash' => self::formatMoney($unifiedTotalIncome),
|
||||
'is_venue' => intval($data['is_venue'] ?? 0),
|
||||
'is_county' => intval($data['is_county'] ?? 0),
|
||||
'county_code' => (string) ($data['county_code'] ?? ''),
|
||||
@@ -161,6 +171,7 @@ class IdentityService
|
||||
'madow' => self::formatMadow($madow),
|
||||
'madow_rate' => self::formatRate($rate),
|
||||
'madow_value' => self::formatMoney((float) $madow * (float) $rate),
|
||||
'show_madow_rate' => PartnerConfig::showMadowRate(),
|
||||
'voucher_total' => self::formatMoney($total),
|
||||
'voucher_released' => self::formatMoney($released),
|
||||
'voucher_used' => self::formatMoney($used),
|
||||
@@ -190,6 +201,9 @@ class IdentityService
|
||||
'madow' => '0',
|
||||
'madow_rate' => self::formatRate($baseRate),
|
||||
'madow_value' => '0.00',
|
||||
'show_madow_rate' => PartnerConfig::showMadowRate(),
|
||||
'total_income' => '0.00',
|
||||
'income_total_cash' => '0.00',
|
||||
'voucher_available' => '0.00',
|
||||
'active_30d' => true,
|
||||
'active_status' => 'inactive',
|
||||
@@ -211,9 +225,12 @@ class IdentityService
|
||||
'maker_level_name' => $full['maker_level_name'],
|
||||
'role_names' => $roleNames,
|
||||
'custom_role_names' => $roleNames,
|
||||
'total_income' => $full['total_income'] ?? '0.00',
|
||||
'income_total_cash' => $full['income_total_cash'] ?? '0.00',
|
||||
'madow' => $full['madow'],
|
||||
'madow_rate' => $full['madow_rate'],
|
||||
'madow_value' => $full['madow_value'],
|
||||
'show_madow_rate' => $full['show_madow_rate'] ?? PartnerConfig::showMadowRate(),
|
||||
'voucher_available' => $full['voucher_available'],
|
||||
'active_30d' => $full['active_30d'],
|
||||
'active_status' => $full['active_status'] ?? 'inactive',
|
||||
|
||||
在新工单中引用
屏蔽一个用户