Commit 41fbfe3d authored by zhuwei's avatar zhuwei

客源加更新时间

parent b1d67998
...@@ -147,7 +147,7 @@ class StatementService ...@@ -147,7 +147,7 @@ class StatementService
$agents_res = $this->agentModel->getAgentsByStoreId($params); $agents_res = $this->agentModel->getAgentsByStoreId($params);
$result["agent_total"] = count($agents_res); $result["agent_total"] = count($agents_res);
$result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions); $result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions); $result["user_num"] = $this->userModel->getAddUserNumByAgentIdV2($conditions);
//本周带看(报备) //本周带看(报备)
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions); $addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions);
$result["follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0; $result["follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0;
......
...@@ -515,6 +515,28 @@ class Users extends Model ...@@ -515,6 +515,28 @@ class Users extends Model
} }
/**
* 获取经纪人新增用户数量
* @param $params
* @return int|string
*/
public function getAddUserNumByAgentIdV2($params)
{
$where_ = [];
$where_or_ = [];
if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"];
}
if (isset($params["create_time"])) {
$where_["create_time"] = $params["create_time"];
$where_or_["update_time"] = $params["create_time"];
}
$result = Db::table($this->table)
->where($where_)->whereOr($where_or_)
->count();
return $result;
}
/** /**
* 按添加时间段分组统计 * 按添加时间段分组统计
* @param $params * @param $params
......
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