Commit 9c4fadd5 by HTML5-侯张振

修改无法到到访看房状态bug

parent 34604368
...@@ -559,7 +559,7 @@ class Report extends CI_Controller ...@@ -559,7 +559,7 @@ class Report extends CI_Controller
$results = $api->newgetCustomerPurchase(array('customer_id'=>$value['rongchuang_id'])); $results = $api->newgetCustomerPurchase(array('customer_id'=>$value['rongchuang_id']));
if(!empty($results)){ if(!empty($results)){
$entity_id = $this->customer_building->get_building_id($value['id']); $entity_id = $this->customer_building->get_building_id($value['id'],$value['rongchuang_id']);
//记录客户跟进信息 //记录客户跟进信息
$customerBuilding = $this->customer_building->get(array('id' => $entity_id['id'])); $customerBuilding = $this->customer_building->get(array('id' => $entity_id['id']));
if($customerBuilding['recommend_status'] < 3){ if($customerBuilding['recommend_status'] < 3){
......
...@@ -663,10 +663,10 @@ class Customer_building_model extends MY_Model{ ...@@ -663,10 +663,10 @@ class Customer_building_model extends MY_Model{
} }
//获取‘tb_customer_building’里的id //获取‘tb_customer_building’里的id
public function get_building_id($Id){ public function get_building_id($Id,$rcId){
$this->db->select('CB.id'); $this->db->select('CB.id');
$this->db->from('tb_customer_building CB'); $this->db->from('tb_customer_building CB');
$this->db->where('CB.customer_id',$Id); $this->db->where('CB.customer_id = '.$Id.' and CB.rongchuang_id = .$rcId');
$query = $this->db->get(); $query = $this->db->get();
if($query->num_rows() > 0) if($query->num_rows() > 0)
{ {
......
...@@ -931,7 +931,7 @@ class Customer_model extends MY_Model{ ...@@ -931,7 +931,7 @@ class Customer_model extends MY_Model{
} }
//得到'tb_customer'表中的'rongchuang_id' //得到'tb_customer'表中的'rongchuang_id'
public function search_rongchuang_id(){ public function search_rongchuang_id(){
$this->db->select('C.rongchuang_id,C.id'); $this->db->select('C.rongchuang_id,C.id,C.customer_mobile');
$this->db->from('tb_customer C'); $this->db->from('tb_customer C');
$this->db->where('C.rongchuang_id <> " "'); $this->db->where('C.rongchuang_id <> " "');
$query = $this->db->get(); $query = $this->db->get();
......
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