From 6ad39e07649f0b1f42d0f78cfbd85deb69f35aca Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 8 Apr 2025 15:41:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=89=B9=E9=87=8F=E8=AF=A2=E7=9B=98=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E5=93=81=E7=B1=BB=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/v1/BulkPurchaseInquiry.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/admin/controller/v1/BulkPurchaseInquiry.php b/app/admin/controller/v1/BulkPurchaseInquiry.php index 74f0b66e..16ea99b1 100644 --- a/app/admin/controller/v1/BulkPurchaseInquiry.php +++ b/app/admin/controller/v1/BulkPurchaseInquiry.php @@ -16,12 +16,11 @@ class BulkPurchaseInquiry public function interested() { $config_name = 'bulk_purchase_inquiry_interested'; - $lang = LanguageModel::bypk(request()->lang_id)->find(); - if (empty($lang)) { - return error('当前选定语言出错'); - } - - $config = SysConfigModel::byName($lang->code . '_' . $config_name)->find(); + $config = SysConfigModel::hasWhere('group', function($query) { + $query->where('language_id', '=', request()->lang_id); + }) + ->byName($config_name) + ->find(); if (empty($config)) { return error('当前选定语言的采购可选品类配置出错'); }