Commit 5e89ed62 authored by zhuwei's avatar zhuwei

获取新增商铺数g_houses_to_agents

parent a1f80d31
......@@ -5,6 +5,7 @@ namespace app\api_broker\service;
use app\model\AAgents;
use app\model\FollowUpLogModel;
use app\model\GHouses;
use app\model\GHousesToAgents;
use app\model\OBargainModel;
use app\model\OMarchInModel;
use app\model\OReportModel;
......@@ -22,6 +23,7 @@ class StatementService
private $agentModel;
private $houseModel;
private $housesToAgents;
private $userModel;
private $followUpModel;
private $reportModel;
......@@ -33,12 +35,13 @@ class StatementService
function __construct()
{
$this->agentModel = new AAgents();
$this->houseModel = new GHouses();
$this->userModel = new Users();
$this->agentModel = new AAgents();
$this->houseModel = new GHouses();
$this->housesToAgents = new GHousesToAgents();
$this->userModel = new Users();
$this->followUpModel = new FollowUpLogModel();
$this->reportModel = new OReportModel();
$this->marchInModel = new OMarchInModel();
$this->reportModel = new OReportModel();
$this->marchInModel = new OMarchInModel();
}
/**
......@@ -140,7 +143,7 @@ class StatementService
$result["agent_total"] = $agent_total;
$result["house_num"] = $this->houseModel->getAddHouseNumByAgentId($conditions);
$result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
//dump($conditions);
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions);
//dump($conditions);
......@@ -362,7 +365,7 @@ class StatementService
//是门店 统计个人业绩
$store_list["agent_id"] = $agent_id;
$store_list["agent_name"] = $agent_name;
$store_list["house_num"] = $this->houseModel->getAddHouseNumByAgentId($conditions_);
$store_list["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions_);
$store_list["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions_);
//$store_list["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions_);
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions_);
......
......@@ -461,7 +461,7 @@ class GHousesToAgents extends BaseModel
/**
* 获取经纪人时间段中新添加的楼盘个
* 获取新增商铺
* @param $params
* @return int|string
*/
......@@ -477,8 +477,6 @@ class GHousesToAgents extends BaseModel
$where_["create_time"] = $params["create_time"];
}
return Db::table($this->table)
->where($where_)
->count();
return $this->where($where_)->count();
}
}
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