调整公司返回字段
This commit is contained in:
parent
eb7855f721
commit
50584259ea
@ -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');
|
||||
}
|
||||
|
||||
}
|
@ -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');
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user