Commit a45423a6 authored by clone's avatar clone

bug

parent f14a733a
...@@ -30,16 +30,16 @@ class Location extends Basic ...@@ -30,16 +30,16 @@ class Location extends Basic
$params = $this->params; $params = $this->params;
$params = array( $params = array(
"agent_id" => 1, "agent_id" => 1,
"city" => "上海" "city" => "上海"
); );
$checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify"); $checkResult = $this->validate($params, "LocationValidate.saveSiteCityVerify");
if (true !== $checkResult) { if (true !== $checkResult) {
return $this->response("101", $checkResult); return $this->response("101", $checkResult);
} }
$city = "上海"; $city = "上海";
$agent_id = $params["agent_id"]; $agent_id = $params["agent_id"];
if ($params["city"] == "杭州") { if ($params["city"] == "杭州市" || $params["city"] == "杭州") {
$city = "杭州"; $city = "杭州";
} }
if ($this->redis_) { if ($this->redis_) {
$this->redis_->set(self::CITY_AGENTS . $agent_id, $city); $this->redis_->set(self::CITY_AGENTS . $agent_id, $city);
......
...@@ -117,9 +117,9 @@ class Basic extends Controller ...@@ -117,9 +117,9 @@ class Basic extends Controller
$redis_ = RedisExt::getRedis(); $redis_ = RedisExt::getRedis();
if ($redis_) { if ($redis_) {
$city = $redis_->get("agent_city_" . $agentId); $city = $redis_->get("agent_city_" . $agentId);
$this->city = empty($city) ? "上海" : $city; $this->city = empty($city) ? "上海" : $city;
} else { } else {
$this->city = "上海"; $this->city = "上海";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment