feat: 收益全额直入商城余额、存量结转与奖项名称全局规范化对齐
这个提交包含在:
@@ -3,7 +3,7 @@
|
||||
namespace addons\shopro\service\partner;
|
||||
|
||||
/**
|
||||
* 统筹运营奖励:无馆有县=100;有馆有县=50+50;有馆无县=50
|
||||
* 渠道管理奖(馆/县拆分):无馆有县=100;有馆有县=50+50;有馆无县=50
|
||||
*/
|
||||
class TeamSplitReward
|
||||
{
|
||||
@@ -30,7 +30,7 @@ class TeamSplitReward
|
||||
PartnerRewardService::writeSkip($order, $buyerId, $venue['user_id'], 'team_venue', 'venue', 'inactive_30d', '酒道馆 30 日无自购');
|
||||
} else {
|
||||
PartnerRewardService::account($order, $buyerId, $venue['user_id'], 'team_venue', 'venue', $venueSplit, $venueSplit, [
|
||||
'formula' => "酒道馆运营奖 {$venueSplit}",
|
||||
'formula' => "酒道馆管理奖 {$venueSplit}",
|
||||
]);
|
||||
$result['venue'] = ['user_id' => $venue['user_id'], 'amount' => $venueSplit, 'index' => $venue['index']];
|
||||
}
|
||||
@@ -41,8 +41,11 @@ class TeamSplitReward
|
||||
if ($county['inactive']) {
|
||||
PartnerRewardService::writeSkip($order, $buyerId, $county['user_id'], 'team_county', 'county', 'inactive_30d', '区县 30 日无自购');
|
||||
} else {
|
||||
$formulaText = $venue
|
||||
? (($venue['user_id'] == $county['user_id']) ? "区县管理奖 {$amount}(馆兼县)" : "区县管理奖 {$amount}(馆上)")
|
||||
: "区县管理奖 {$amount}(直达)";
|
||||
PartnerRewardService::account($order, $buyerId, $county['user_id'], 'team_county', 'county', $amount, $amount, [
|
||||
'formula' => $venue ? "区县统筹奖 {$amount}(馆上)" : "区县统筹奖 {$amount}(直达)",
|
||||
'formula' => $formulaText,
|
||||
]);
|
||||
$result['county'] = ['user_id' => $county['user_id'], 'amount' => $amount, 'index' => $county['index']];
|
||||
}
|
||||
@@ -71,7 +74,8 @@ class TeamSplitReward
|
||||
|
||||
protected function nearestCounty($chain, $venue, ActiveService $active)
|
||||
{
|
||||
$start = $venue ? ($venue['index'] + 1) : 0;
|
||||
// 若酒道馆节点本身兼任区县代理,允许从该酒道馆节点开始匹配(兼具双重身份场景);若未兼任,循环会自动检查其上一级
|
||||
$start = $venue ? $venue['index'] : 0;
|
||||
for ($i = $start; $i < count($chain); $i++) {
|
||||
if (!intval($chain[$i]['is_county'] ?? 0)) {
|
||||
continue;
|
||||
|
||||
在新工单中引用
屏蔽一个用户