Commit 15b1dd26 authored by clone's avatar clone

bug

parent 948210bf
...@@ -53,11 +53,12 @@ class AttentionShop extends Basic ...@@ -53,11 +53,12 @@ class AttentionShop extends Basic
*/ */
public function attentionList() public function attentionList()
{ {
$params = array( $params = $this->params;
/* $params = array(
"user_id" => 1, "user_id" => 1,
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15, "pageSize" => 15,
); );*/
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo']; $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize']; $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
......
...@@ -171,9 +171,9 @@ class Shop extends Basic ...@@ -171,9 +171,9 @@ class Shop extends Basic
} }
//todo 查询关注门店 //todo 查询关注门店
if (isset($this->userId)) { if (isset($this->userId)) {
$attention["user_id"] = $this->userId; $attention["user_id"] = array( "eq", $this->userId );
$attention["house_id"] = $params["id"]; $attention["house_id"] = array( "eq", $params["id"] );
$attention["is_del"] = 0; $attention["is_del"] = array( "eq", 0 );;
$attResult = $this->attentionModel->getAttentionByUserIdAndHouseId($attention); $attResult = $this->attentionModel->getAttentionByUserIdAndHouseId($attention);
if (count($attResult) > 0) if (count($attResult) > 0)
$result ["attention"] = $attResult["id"]; $result ["attention"] = $attResult["id"];
......
...@@ -89,7 +89,7 @@ class AttentionModel extends Model ...@@ -89,7 +89,7 @@ class AttentionModel extends Model
*/ */
public function getAttentionByUserIdAndHouseId($params) public function getAttentionByUserIdAndHouseId($params)
{ {
return $this->find("id") return $this->field("id")
->where($params) ->where($params)
->limit(1) ->limit(1)
->select()[0]; ->select()[0];
......
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