feat: 收益全额直入商城余额、存量结转与奖项名称全局规范化对齐
这个提交包含在:
@@ -84,7 +84,20 @@ class User extends Common
|
||||
|
||||
$agent = \addons\shopro\service\partner\IdentityService::findAgent($user->id);
|
||||
$partner = \addons\shopro\service\partner\IdentityService::attachProfile($agent);
|
||||
if (empty($partner['total_income']) || $partner['total_income'] === '0.00') {
|
||||
$userRewardCash = \app\admin\model\shopro\partner\Reward::where('user_id', $user->id)
|
||||
->where('status', 1)
|
||||
->where('amount', '>', 0)
|
||||
->sum('amount');
|
||||
if ($userRewardCash > 0) {
|
||||
$formatted = \addons\shopro\service\partner\IdentityService::formatMoney($userRewardCash);
|
||||
$partner['total_income'] = $formatted;
|
||||
$partner['income_total_cash'] = $formatted;
|
||||
}
|
||||
}
|
||||
$data = array_merge($user->toArray(), $partner);
|
||||
// 对齐用户余额字段:统一映射商城余额,避免前端不同字段读取出现口径偏差
|
||||
$data['balance'] = $user->money;
|
||||
|
||||
$this->success('个人详情', $data);
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户