Commit 15b1dd26 authored by clone's avatar clone

bug

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