6
0
Fork 0

优化会员等级校验

release
李静 2022-01-19 14:43:39 +08:00
parent 73262cfd4e
commit 5653a0869b
1 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,10 @@ class User extends Model implements AuthorizableContract, AuthenticatableContrac
*/
public function isVip(): bool
{
if ($this->userInfo->agent_level > UserInfo::AGENT_LEVEL_VIP) {
return true;
}
return $this->userInfo?->growth_value >= config('agent.upgrade_rules.vip.sales_value');
}