Commit cf5cb1fd authored by clone's avatar clone

bug

parent e0c238e6
......@@ -235,7 +235,7 @@ class Broker extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"user_id" => 1
"user_id" => 8738
);*/
if (!isset($params['user_id'])) {
......
......@@ -353,9 +353,9 @@ class OrderLogService
}
}
//跟进
$field_follow_up = "id,agent_id,agent_name,user_type,decision_maker,industry_type,area_requirement,price_requirement,province,city,
district,business_area,explain,explain_img,create_time";
$followUpLogData = $followUpLogModel->selectFollowUpListByReportId($field_follow_up, $reportParams);
$field_follow_up = "a.id,a.agent_id,a.agent_name,a.user_type,a.decision_maker,a.industry_type,a.area_requirement,a.price_requirement,a.province,a.city,
a.district,a.business_area,a.explain,a.explain_img,a.create_time,b.name,b.img,c.store_name";
$followUpLogData = $followUpLogModel->getFollowUpByOrderId($field_follow_up, $reportParams);
if (count($followUpLogData) > 0) {
foreach ($followUpLogData as $k => $v) {
......
......@@ -111,6 +111,7 @@ class ReportService
//todo 获取我报备的我的案场的,如果是店长则获取其下所有的经纪人
$vModel = new VerifyService();
$agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]);
// dump($agentArr);
if ($agentArr) {
$params["report_agent_id"] = $agentArr;
}
......
......@@ -94,7 +94,22 @@ class FollowUpLogModel extends Model
->where($where_)
->select();
}
public function getFollowUpByOrderId($field,$params){
$where_ = [];
if (isset($params["report_id"])) {
$where_["report_id"] = $params["report_id"];
}
if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"];
}
return Db::table($this->table)
->field($field)
->alias("a")
->join("a_agents b","a.agent_id = c.id","left")
->join("a_store c","b.store_id = c.id","left")
->where($where_)
->select();
}
/**
* 获取经纪人新增带看数量
......
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