Commit 2c317b46 by HTML5-侯张振

修复 渠道客户展示bug

parent 546e6444
......@@ -158,10 +158,10 @@ class Index extends CI_Controller{
else{
$where.='E.id = '.$channel_id;
}
if($building_id!=''){
$where.=' and B.building_id = '.$building_id;
}
//var_dump($this->session->userdata('u_id'));
$build=$this->manager->get(array('id'=>$this->session->userdata('u_id')));
//var_dump($build['building_id']);
$where.=' and B.building_id in ('.$build['building_id'].')';
if($start_time!=''){
$where.=' and B.create_time >= '.$start_time;
}
......@@ -295,6 +295,35 @@ class Index extends CI_Controller{
$where=array(
'CB.id'=>$cb_id
);
//获取分配时间
$where1 = array(
'RT.entity_id'=>$cb_id,
'RT.trace_status'=>1
);
$this->data['distribution']=$this->recommend_trace->get_create_time($where1);
// var_dump($this->data['distribution']);
// exit;
// 获取到访时间
$where2 = array(
'RT.entity_id'=>$cb_id,
'RT.trace_status'=>2
);
$this->data['visit_time']=$this->recommend_trace->get_create_time($where2);
//获取认购时间
$where3 = array(
'RT.entity_id'=>$cb_id,
'RT.trace_status'=>3
);
$this->data['subscribe']=$this->recommend_trace->get_create_time($where3);
//获取签约时间
$where4 = array(
'RT.entity_id'=>$cb_id,
'RT.trace_status'=>4
);
$this->data['signing']=$this->recommend_trace->get_create_time($where4);
$query=$this->customer_building->get_custormer_channellist_byStatus($where,1,1);
if($query[0]['sale_id']!=0){
$sales=$this->user->get(array('id'=>$query[0]['sale_id']));
......@@ -306,7 +335,7 @@ class Index extends CI_Controller{
$this->data['entity']=$query;
$this->data['datestring']=$datestring;
$this->data['dateformat']=$dataformat;
$this->data['counts']=count($feedbacks);
$this->data['counts']=$query[0]['recommend_status'];
$this->load->view('channel/follow',$this->data);
}
......
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