修复(收益): 纠正累计收益统计口径为真实分成收益,排除dmepa与兑换券释放干扰
这个提交包含在:
@@ -135,7 +135,7 @@ class IdentityService
|
||||
public static function formatMadow($value)
|
||||
{
|
||||
$floatVal = (float) $value;
|
||||
// 当存在小于 1 豆且大于 0 的微量dmepa时,自适应保留有效小数(最多4位),避免直接抹零显示为 0 豆
|
||||
// 当存在小于 1 枚且大于 0 的微量dmepa时,自适应保留有效小数(最多4位),避免直接抹零显示为 0 枚
|
||||
if ($floatVal > 0 && $floatVal < 1) {
|
||||
return rtrim(rtrim(number_format($floatVal, 4, '.', ''), '0'), '.');
|
||||
}
|
||||
@@ -205,7 +205,9 @@ class IdentityService
|
||||
$data = is_object($agent) ? $agent->toArray() : $agent;
|
||||
$userId = intval($data['user_id'] ?? 0);
|
||||
$agentTotalIncome = floatval($data['total_income'] ?? 0);
|
||||
$cashTypes = PartnerConfig::cashTypes();
|
||||
$rewardCash = $userId > 0 ? \app\admin\model\shopro\partner\Reward::where('user_id', $userId)
|
||||
->whereIn('reward_type', $cashTypes)
|
||||
->where('status', 1)
|
||||
->where('amount', '>', 0)
|
||||
->sum('amount') : 0;
|
||||
|
||||
在新工单中引用
屏蔽一个用户