fix(partner): 优化首单自动晋升品酒师并校准全收益终审验收脚本

这个提交包含在:
chen
2026-09-26 14:21:02 +08:00
父节点 04a8e45992
当前提交 8c2e20352c
共有 2 个文件被更改,包括 27 次插入 和 6 次删除

查看文件

@@ -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) {