提现bug处理
This commit is contained in:
@@ -807,16 +807,22 @@ class ChannelController extends BaseController
|
||||
$cid = $stat['channelId'];
|
||||
if (!isset($withdrawalStats[$cid])) {
|
||||
$withdrawalStats[$cid] = [
|
||||
'totalRevenue' => 0, // 所有状态的总金额
|
||||
'totalRevenue' => 0, // 总收益(不包括驳回的)
|
||||
'withdrawn' => 0, // 已打款(paid)
|
||||
'pendingReview' => 0 // 待审核(pending)
|
||||
];
|
||||
}
|
||||
$amount = intval($stat['totalAmount'] ?? 0);
|
||||
$withdrawalStats[$cid]['totalRevenue'] += $amount;
|
||||
if ($stat['status'] === DistributionWithdrawal::STATUS_PAID) {
|
||||
$status = $stat['status'];
|
||||
|
||||
// totalRevenue 不包括驳回(rejected)状态的金额
|
||||
if ($status !== DistributionWithdrawal::STATUS_REJECTED) {
|
||||
$withdrawalStats[$cid]['totalRevenue'] += $amount;
|
||||
}
|
||||
|
||||
if ($status === DistributionWithdrawal::STATUS_PAID) {
|
||||
$withdrawalStats[$cid]['withdrawn'] += $amount;
|
||||
} elseif ($stat['status'] === DistributionWithdrawal::STATUS_PENDING) {
|
||||
} elseif ($status === DistributionWithdrawal::STATUS_PENDING) {
|
||||
$withdrawalStats[$cid]['pendingReview'] += $amount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user