Commit 7a7aa95d authored by zhuwei's avatar zhuwei

委托转铺列表

parent 1c96cf4a
...@@ -71,6 +71,20 @@ class Transfer extends Basic ...@@ -71,6 +71,20 @@ class Transfer extends Basic
$where['a.shop_name'] = ['like', $params['shop_name'].'%']; $where['a.shop_name'] = ['like', $params['shop_name'].'%'];
} }
if (!empty($params['agent_id'])) {
$where['c.agent_id'] = $params['agent_id'];
}else{
//是否有客方 0为没有,1为有
if (!empty($params['agent_type'])) {
if($params['agent_type'] == 1){
$where['c.agent_id'] = array('gt',0);
}else{
$where['c.agent_id'] = 0;
}
}
}
$sublet = new SubletModel(); $sublet = new SubletModel();
$fields = 'a.id,a.shop_name,a.manage_type,a.address_detail,a.province,a.city,a.district,FORMAT(a.expected_rent/100,2) as expected_rent, $fields = 'a.id,a.shop_name,a.manage_type,a.address_detail,a.province,a.city,a.district,FORMAT(a.expected_rent/100,2) as expected_rent,
......
...@@ -48,6 +48,7 @@ class SubletModel extends BaseModel ...@@ -48,6 +48,7 @@ class SubletModel extends BaseModel
$result = $this->field($fields) $result = $this->field($fields)
->alias("a") ->alias("a")
->join("g_houses b","a.house_id=b.id","left") ->join("g_houses b","a.house_id=b.id","left")
->join("u_users c", "a.user_id = c.id", "left")
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
......
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