Commit 75758930 authored by clone's avatar clone

已看列表 预约看铺

parent b8dbf71b
......@@ -105,15 +105,15 @@ class AppointmentTime extends Basic
*/
public function getAppointmentSeeShopList()
{
$params = array(
"status" => 1, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
/* $params = array(
"status" => 2, //看铺状态 0待经纪人确认(确认后存agents_id) 1:待看 2:已看' 如果是待看 0,1 已看是2
"user_id" => "11142",//对应u_users表
"phone" => "13661753534",//phone
"pageNo" => "1",
"pageSize" => 15
);
);*/
// $params = $this->params;
$params = $this->params;
if (!isset($params["status"])) {
return $this->response("101", "请求状态不能为空");
......@@ -212,11 +212,11 @@ class AppointmentTime extends Basic
*/
public function getYetListV2($pageNo, $pageSize, $params)
{
$field = "a.id,a.phone,c.reception_id as agents_id,c.create_time as expect_time,a.house_id,
$field = "a.id,a.report_agent_phone as phone,a.report_agent_id as agents_id,a.predict_see_time as expect_time,b.house_id,
d.external_title as house_title,d.residue_num as room_num_left";
$where_["a.user_id"] = $params["user_id"];
$result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
// $result = $this->appointmentTimeModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
$result = $this->reportModel->getHaveToSeeList($pageNo, $pageSize, "id desc", $field, $where_);
//获取图片信息
foreach ($result as $key => $val) {
......
......@@ -496,4 +496,34 @@ class OReportModel extends Model
return $data;
}
/**
* 预约看铺列表 已看列表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getHaveToSeeList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field, $params)
{
$data = $this
->field($field)
->alias("a")
->join("o_order b", "b.f_id = a.id", "left")
->join("o_march_in c","c.report_id = a.id","right")
->join("g_houses d","d.id = b.house_id","left")
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->select();
echo $this->getLastSql();
return $data;
}
}
\ No newline at end of file
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