From c9d99f797557d1c0324a2e3678c974a7804ad383 Mon Sep 17 00:00:00 2001 From: guojia <445241500@qq.com> Date: Tue, 30 Apr 2024 13:41:12 +0800 Subject: [PATCH] trace --- app/common/model/Merchant.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/app/common/model/Merchant.php b/app/common/model/Merchant.php index d1e52e8c..2b73349d 100644 --- a/app/common/model/Merchant.php +++ b/app/common/model/Merchant.php @@ -71,15 +71,11 @@ class Merchant extends BaseModel */ public static function detail(int $merchantId) { - try { - $list = self::withoutGlobalScope() - ->with(['logoImage', "licenseImage"]) - ->where('merchant_id', '=', $merchantId) - ->find(); - return $list ?? null; - } catch (\Exception $e) { - return null; - } + $where = [ + 'merchant_id' => $merchantId, + 'store_id' => self::$storeId + ]; + return static::get($where, []); } /**