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