From 50584259ea1796ed979567c3226de4cbc3f99e89 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Fri, 21 Jul 2023 18:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=AC=E5=8F=B8=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/Company.php | 25 ------------------------- app/common/model/auth/Admin.php | 20 -------------------- 2 files changed, 45 deletions(-) diff --git a/app/common/model/Company.php b/app/common/model/Company.php index 1f1b36639..0f7d420f6 100644 --- a/app/common/model/Company.php +++ b/app/common/model/Company.php @@ -32,29 +32,4 @@ class Company extends BaseModel return DictData::where('id', $value)->value('name'); } - public function getProvinceAttr($value) - { - return Db::name('geo_province')->where(['province_code' => $value])->value('province_name'); - } - - public function getCityAttr($value) - { - return Db::name('geo_city')->where(['city_code' => $value])->value('city_name'); - } - - public function getAreaAttr($value) - { - return Db::name('geo_area')->where(['area_code' => $value])->value('area_name'); - } - - public function getStreetAttr($value) - { - return Db::name('geo_street')->where(['street_code' => $value])->value('street_name'); - } - - public function getAreaManagerAttr($value) - { - return Db::name('admin')->where(['id' => $value])->value('name'); - } - } \ No newline at end of file diff --git a/app/common/model/auth/Admin.php b/app/common/model/auth/Admin.php index b1e37af8d..8d0528570 100755 --- a/app/common/model/auth/Admin.php +++ b/app/common/model/auth/Admin.php @@ -120,24 +120,4 @@ class Admin extends BaseModel return $this->hasOne(Company::class, 'id', 'company_id'); } - public function getProvinceAttr($value) - { - return Db::name('geo_province')->where(['province_code' => $value])->value('province_name'); - } - - public function getCityAttr($value) - { - return Db::name('geo_city')->where(['city_code' => $value])->value('city_name'); - } - - public function getAreaAttr($value) - { - return Db::name('geo_area')->where(['area_code' => $value])->value('area_name'); - } - - public function getStreetAttr($value) - { - return Db::name('geo_street')->where(['street_code' => $value])->value('street_name'); - } - } \ No newline at end of file