fix(partner): 优化首单自动晋升品酒师并校准全收益终审验收脚本
这个提交包含在:
@@ -242,6 +242,15 @@ class PartnerRewardService
|
||||
protected function updateAgentOrderTime($userId, $timestamp)
|
||||
{
|
||||
$agent = AgentModel::where('user_id', $userId)->find();
|
||||
if (!$agent) {
|
||||
try {
|
||||
$agentService = new \addons\shopro\service\commission\Agent($userId);
|
||||
$agent = $agentService->createNewAgent();
|
||||
} catch (\Throwable $e) {}
|
||||
if (!$agent) {
|
||||
$agent = AgentModel::where('user_id', $userId)->find();
|
||||
}
|
||||
}
|
||||
if ($agent) {
|
||||
$current = intval($agent->last_self_order_time ?? 0);
|
||||
if ($timestamp >= $current) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户