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

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

查看文件

@@ -373,6 +373,7 @@ class DailySettleService
}
$each = function_exists('bcdiv') ? bcdiv((string) $pool, (string) $count, 2) : number_format($pool / $count, 2, '.', '');
$distributed = 0;
$walletType = PartnerConfig::rewardWalletType();
foreach ($userIds as $userId) {
PartnerRewardService::write([
'order_id' => $orderId,
@@ -382,11 +383,14 @@ class DailySettleService
'amount' => $each,
'base_amount' => $pool,
'settle_date' => $settleDate,
'ext' => ['formula' => "{$label}奖池 {$pool} / {$count} = {$each}", 'share_user_count' => $count],
'ext' => [
'formula' => "{$label}奖池 {$pool} / {$count} = {$each}",
'share_user_count' => $count,
'wallet_type' => $walletType,
],
'status' => 1,
]);
if ((float) $each > 0) {
$walletType = PartnerConfig::rewardWalletType();
Wallet::change($userId, $walletType, $each, $type, [
'settle_date' => $settleDate,
]);
@@ -404,7 +408,10 @@ class DailySettleService
'amount' => $tail,
'base_amount' => $pool,
'settle_date' => $settleDate,
'ext' => ['formula' => "{$label}尾差 {$tail} 进平台"],
'ext' => [
'formula' => "{$label}尾差 {$tail} 进平台",
'wallet_type' => 'system',
],
'status' => 1,
]);
}
@@ -434,7 +441,11 @@ class DailySettleService
'amount' => $pool,
'base_amount' => $pool,
'settle_date' => null,
'ext' => ['formula' => "{$label}分母为0,奖池 {$pool} 进平台", 'orders' => $orderIds],
'ext' => [
'formula' => "{$label}分母为0,奖池 {$pool} 进平台",
'orders' => $orderIds,
'wallet_type' => 'system',
],
'status' => 1,
]);
return ['pool' => $pool, 'count' => 0, 'each' => '0.00'];
@@ -442,6 +453,7 @@ class DailySettleService
$each = function_exists('bcdiv') ? bcdiv((string) $pool, (string) $count, 2) : number_format($pool / $count, 2, '.', '');
$distributed = 0;
$walletType = PartnerConfig::rewardWalletType();
foreach ($userIds as $userId) {
PartnerRewardService::write([
@@ -453,11 +465,16 @@ class DailySettleService
'amount' => $each,
'base_amount' => $pool,
'settle_date' => null,
'ext' => ['formula' => "{$label}奖池 {$pool} / {$count} = {$each}", 'share_user_count' => $count, 'pool' => $pool, 'orders' => $orderIds],
'ext' => [
'formula' => "{$label}奖池 {$pool} / {$count} = {$each}",
'share_user_count' => $count,
'pool' => $pool,
'orders' => $orderIds,
'wallet_type' => $walletType,
],
'status' => 1,
]);
if ((float) $each > 0) {
$walletType = PartnerConfig::rewardWalletType();
Wallet::change($userId, $walletType, $each, $type, [
'minute_settle' => 1,
'orders' => $orderIds,
@@ -478,7 +495,11 @@ class DailySettleService
'amount' => $tail,
'base_amount' => $pool,
'settle_date' => null,
'ext' => ['formula' => "{$label}尾差 {$tail} 进平台", 'orders' => $orderIds],
'ext' => [
'formula' => "{$label}尾差 {$tail} 进平台",
'orders' => $orderIds,
'wallet_type' => 'system',
],
'status' => 1,
]);
}