From 95f49fa8a18d2ee5e37edf04d114b2976b594e20 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Tue, 6 Feb 2024 18:14:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=98=AF=E5=90=A6=E4=B8=BA=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 4824e63..80263f0 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -7,6 +7,7 @@ namespace app\controller\api; use app\common\model\user\ExchangePickupPoint; +use app\common\repositories\marketing\AgentRepository; use app\common\repositories\store\order\StoreOrderRepository; use app\common\repositories\store\order\StoreRefundOrderRepository; use app\common\repositories\system\notice\SystemNoticeConfigRepository; @@ -162,6 +163,9 @@ class Auth extends BaseController } // 用户是否为兑换站点管理员 $data['is_exchange_saff'] = app()->make(ExchangePickupPointRepository::class)->userIsStaff($user->uid); + // 用户是否存在代理身份 + $agentCount = app()->make(AgentRepository::class)->getSearchModel(['uid'=>$user->uid])->count(); + $data['is_agent'] = $agentCount > 0; // 用户持有可用酒卡额度 $data['available'] = (float)app()->make(ExchangeQuotaRepository::class) ->searchModel(['uid'=>$user->uid])