调整订单推广人查询

This commit is contained in:
luofei 2024-03-12 10:10:56 +08:00 committed by mkm
parent d826c9777a
commit 222416cb08

View File

@ -319,7 +319,11 @@ class Merchant extends BaseModel
public function promoter()
{
return User::where('uid', $this->uid)->field('spread_uid as uid,nickname')->find();
$spreadId = User::where('uid', $this->uid)->value('spread_uid');
if ($spreadId > 0) {
return User::where('uid', $spreadId)->field('uid,nickname')->find();
}
return null;
}
}