Commit cf3ad057 authored by hujun's avatar hujun

预约看铺

parent 12b554c1
...@@ -72,13 +72,14 @@ class WatchShop extends Basic ...@@ -72,13 +72,14 @@ class WatchShop extends Basic
$data['list'] = []; $data['list'] = [];
$data['total'] = 0; $data['total'] = 0;
if ($params['type'] == 1) { if ($params['check_status'] == 1) {
$data['list'] = $applies->getAppointWatchShopList($pageNo, $pageSize, 'id DESC', '*', $where); $data['list'] = $applies->getAppointWatchShopList($pageNo, $pageSize, 'id DESC', 'a.*', $where);
$data['total'] = $applies->getAppointWatchShopListTotal($where); $data['total'] = $applies->getAppointWatchShopListTotal($where);
} }
if ($params['type'] == 2) { if ($params['check_status'] == 2) {
$data['list'] = $applies->getAppointWatchOurList($pageNo, $pageSize, 'id DESC', '*', $where); $where['b.agent_id'] = $this->userId;
$data['list'] = $applies->getAppointWatchOurList($pageNo, $pageSize, 'id DESC', 'a.*', $where);
$data['total'] = $applies->getAppointWatchOurTotal($where); $data['total'] = $applies->getAppointWatchOurTotal($where);
} }
......
...@@ -81,7 +81,7 @@ class AppointWatchShop extends BaseModel ...@@ -81,7 +81,7 @@ class AppointWatchShop extends BaseModel
->field($field) ->field($field)
->alias('a') ->alias('a')
->join('u_users b', 'a.user_id=b.id', 'left') ->join('u_users b', 'a.user_id=b.id', 'left')
->join('a_agents c', 'b.id=c.agent_id', 'left') ->join('a_agents c', 'b.agent_id=c.id', 'left')
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
...@@ -100,7 +100,7 @@ class AppointWatchShop extends BaseModel ...@@ -100,7 +100,7 @@ class AppointWatchShop extends BaseModel
return $this return $this
->alias('a') ->alias('a')
->join('u_users b', 'a.user_id=b.id', 'left') ->join('u_users b', 'a.user_id=b.id', 'left')
->join('a_agents c', 'b.id=c.agent_id', 'left') ->join('a_agents c', 'b.agent_id=c.id', 'left')
->where($params) ->where($params)
->count(); ->count();
} }
......
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