diff --git a/server/app/common/model/SubMerchant.php b/server/app/common/model/SubMerchant.php new file mode 100644 index 0000000..0f3229a --- /dev/null +++ b/server/app/common/model/SubMerchant.php @@ -0,0 +1,57 @@ +where(['province_code' => $this->province])->value('province_name'); + } + + public function getCityNameAttr($value) + { + return Db::name('geo_city')->where(['city_code' => $this->city])->value('city_name'); + } + + public function getAreaNameAttr($value) + { + return Db::name('geo_area')->where(['area_code' => $this->area])->value('area_name'); + } + + public function getStreetNameAttr($value) + { + return Db::name('geo_street')->where(['street_code' => $this->street])->value('street_name'); + } + + public function getVillageNameAttr($value) + { + return Db::name('geo_village')->where(['village_code' => $this->village])->value('village_name'); + } + +} \ No newline at end of file