Commit addba98e by html5-李恒逸

更改:分销商绑定时,过滤掉已经绑定的楼盘

parent 3e01f604
......@@ -1064,7 +1064,7 @@ class Report extends CI_Controller
$where .= ' and b.id in(' . $info['building_id'] . ')'; //echo $where;die;
$all_result = $this->relate->get_unbind_list(trim($where)); //查询所有的笛卡尔积(项目*分销商)
$has_result = $this->relate->get_bind_list($uid); //查询已经绑定此销管的分销商
$has_result = $this->relate->get_bind_list($info['building_id']); //查询已经绑定此销管的分销商
if ($all_result) {
foreach ($all_result as $key => $all) {
......
......@@ -174,9 +174,9 @@ class Building_distributor_model extends MY_Model{
}
//查询已经绑定此销管的分销商
public function get_bind_list($manager_id = '')
public function get_bind_list($building_id = '')
{
$query = $this->db->query('SELECT distributor_id,building_id from tb_building_distributor_relate WHERE user_id =' . $manager_id);
$query = $this->db->query('SELECT distributor_id,building_id from tb_building_distributor_relate WHERE building_id in (' . $building_id.')');
if($query->num_rows() > 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