Commit 64911934 authored by zhuwei's avatar zhuwei

客户浏览商铺记录

parent 633b82f4
...@@ -159,4 +159,28 @@ class LookShop extends Basic ...@@ -159,4 +159,28 @@ class LookShop extends Basic
return $this->response("200", "request success", $result); return $this->response("200", "request success", $result);
} }
/**
* 客户浏览记录
* @return \think\Response
*/
public function getLookShopList()
{
$params = $this->params;
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$s_look_Shop = new LookShopService();
$field = 'a.source,a.create_time,b.buyer_nick,b.buyer_img,c.id as user_id';
$conditions['a.source'] = 1;
$result = $s_look_Shop->getLookShopList($conditions,$field,$pageNo, $pageSize);
if($result){
return $this->response("200", "success", $result);
}else{
return $this->response("101", "暂无数据", []);
}
}
} }
\ No newline at end of file
...@@ -236,4 +236,29 @@ class LookShopService ...@@ -236,4 +236,29 @@ class LookShopService
} }
/**
* 客户浏览记录
* @param $conditions
* @param $field
* @param $pageNo
* @param $pageSize
* @return bool
*/
public function getLookShopList($conditions,$field,$pageNo, $pageSize)
{
$m_look_shop = new TLookShopUser();
$list = $m_look_shop->getLookShopList($conditions, $field, $pageNo, $pageSize);
if (!$list) {
return false;
}
$count = $m_look_shop->getLookShopListCount($conditions,$field);
$result["list"] = $list;
$result["total"] = $count;
return $result;
}
} }
\ No newline at end of file
...@@ -65,4 +65,28 @@ class TLookShopUser extends Model ...@@ -65,4 +65,28 @@ class TLookShopUser extends Model
->order("id desc") ->order("id desc")
->select(); ->select();
} }
public function getLookShopList($condition, $field, $pageNo, $pageSize)
{
return $this->db_
->field($field)
->alias("a")
->join("u_wx_info b","a.user_id=b.id","left")
->join("u_users c", "c.buyer_id=b.id", "left")
->where($condition)
->page($pageNo)
->limit($pageSize)
->order("a.id desc")
->select();
}
public function getLookShopListCount($condition, $field)
{
return $this->db_
->field($field)
->alias("a")
->join("u_wx_info b","a.user_id=b.id","left")
->join("u_users c", "c.buyer_id=b.id", "left")
->where($condition)
->count();
}
} }
\ No newline at end of file
...@@ -925,6 +925,7 @@ Route::group('broker', [ ...@@ -925,6 +925,7 @@ Route::group('broker', [
'getAgentsResidueNumList' => ['api_broker/LookShop/getAgentsResidueNumList', ['method' => 'get']], //经纪人列表 'getAgentsResidueNumList' => ['api_broker/LookShop/getAgentsResidueNumList', ['method' => 'get']], //经纪人列表
'getAgentsResidueNumListV2' => ['api_broker/LookShop/getAgentsResidueNumListV2', ['method' => 'get']], //经纪人列表 'getAgentsResidueNumListV2' => ['api_broker/LookShop/getAgentsResidueNumListV2', ['method' => 'get']], //经纪人列表
'setAgentLookNum' => ['api_broker/LookShop/setAgentLookNum', ['method' => 'post']], //设置经纪人的看铺数量 'setAgentLookNum' => ['api_broker/LookShop/setAgentLookNum', ['method' => 'post']], //设置经纪人的看铺数量
'getLookShopList' => ['api_broker/LookShop/getLookShopList', ['method' => 'POST|GET']], //设置经纪人的看铺数量
//首页跟进记录 //首页跟进记录
'userFollowUpList' => ['api_broker/HomePageLog/userFollowUpList', ['method' => 'post|get']], 'userFollowUpList' => ['api_broker/HomePageLog/userFollowUpList', ['method' => 'post|get']],
......
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