From 8a09c4bd559234de1a96d0f9268c3c1e32a8feca Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Sat, 12 Aug 2023 16:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/informationg/UserInformationg.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/common/model/informationg/UserInformationg.php b/app/common/model/informationg/UserInformationg.php index 30237e243..5ec377ced 100644 --- a/app/common/model/informationg/UserInformationg.php +++ b/app/common/model/informationg/UserInformationg.php @@ -157,10 +157,7 @@ class UserInformationg extends BaseModel } public function getBrigadeNameAttr($value) { - if ($this->brigade_id) { - return Db::name('geo_brigade')->where('id', 'in', explode(',', $this->brigade_id))->field('brigade_name')->select(); - } else { - return []; - } + return Db::name('geo_brigade')->where('id', $this->brigade_id)->value('brigade_name'); + } }