Commit 7617fcda authored by zhuwei's avatar zhuwei

bug

parent 6466add5
...@@ -448,11 +448,9 @@ class UserService ...@@ -448,11 +448,9 @@ class UserService
return false; return false;
} }
$param['wx_open_id'] = $open_id; $param['wx_union_id'] = $open_id;
$fields='a.user_phone'; $fields='a.user_phone';
$result = $this->user->getUserInfoByOpenId($param, $fields); $result = $this->user->getUserInfoByOpenId($param, $fields);
dump($param);
dump($result);
if ($result) { if ($result) {
return true; return true;
......
...@@ -973,8 +973,8 @@ class Users extends Model ...@@ -973,8 +973,8 @@ class Users extends Model
public function getUserInfoByOpenId($param, $fields) public function getUserInfoByOpenId($param, $fields)
{ {
$where_ = []; $where_ = [];
if (isset($param["wx_open_id"])) { if (isset($param["wx_union_id"])) {
$where_["b.wx_open_id"] = $param["wx_open_id"]; $where_["b.wx_union_id"] = $param["wx_union_id"];
} }
$data = $this $data = $this
->field($fields) ->field($fields)
...@@ -982,7 +982,7 @@ class Users extends Model ...@@ -982,7 +982,7 @@ class Users extends Model
->join("u_wx_info b", "a.buyer_id=b.id", "left") ->join("u_wx_info b", "a.buyer_id=b.id", "left")
->where($where_) ->where($where_)
->select(); ->select();
dump($this->getLastSql()); //dump($this->getLastSql());
return $data; return $data;
} }
} }
......
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