Commit 28452848 authored by clone's avatar clone

bug

parent 0f6e1dbc
......@@ -128,30 +128,33 @@ class Report extends Basic
"house_id" => 1
);*/
if (!isset($params["agent_id"]) || !isset($params["house_id"])) {
if (!isset($params["agent_id"])) {
return $this->response("101", "请求参数错误");
}
$agent_id = $params["agent_id"];
$house_id = $params["house_id"];
if(isset($params["house_id"])){
$agent_id = $params["agent_id"];
$house_id = $params["house_id"];
//todo 判断是不是案场权限人
$agentToHouseModel = new GHousesToAgents();
$where_["houses_id"] = $house_id;
$where_["agents_id"] = $agent_id;
$where_["type"] = 1;
$where_["is_del"] = 0;
$isCase = $agentToHouseModel->getHouseToAgents("id", $where_);
$result["marchIn"] = $result["collectingBill"] = $result["refund"] = $result["bargain"] = false;
if (count($isCase) > 0) {
$result["marchIn"] = true;
$result["collectingBill"] = true;
$result["refund"] = true;
$result["bargain"] = true;
//todo 判断是不是案场权限人
$agentToHouseModel = new GHousesToAgents();
$where_["houses_id"] = $house_id;
$where_["agents_id"] = $agent_id;
$where_["type"] = 1;
$where_["is_del"] = 0;
$isCase = $agentToHouseModel->getHouseToAgents("id", $where_);
$result["marchIn"] = $result["collectingBill"] = $result["refund"] = $result["bargain"] = false;
if (count($isCase) > 0) {
$result["marchIn"] = true;
$result["collectingBill"] = true;
$result["refund"] = true;
$result["bargain"] = true;
return $this->response("200", "request success", $result);
return $this->response("200", "request success", $result);
}
}
$auth_arr = [
/*'broker/report',
'broker/addFollowUp',*/
......
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