Commit 6deb381c authored by zhuwei's avatar zhuwei

成交报告

parent df730c89
...@@ -5,6 +5,7 @@ namespace app\api_broker\controller; ...@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\BargainService; use app\api_broker\service\BargainService;
use app\model\AAgents; use app\model\AAgents;
use think\Log;
use think\Request; use think\Request;
/** /**
...@@ -40,6 +41,7 @@ class Bargain extends Basic ...@@ -40,6 +41,7 @@ class Bargain extends Basic
"page_no" => 1, "page_no" => 1,
"page_size" => 10 "page_size" => 10
);*/ );*/
$checkResult = $this->validate($params, "BargainValidate.bargainList"); $checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) { if (true !== $checkResult) {
return $this->response("101", $checkResult); return $this->response("101", $checkResult);
...@@ -55,15 +57,12 @@ class Bargain extends Basic ...@@ -55,15 +57,12 @@ class Bargain extends Basic
$agent_field = "a.level"; $agent_field = "a.level";
$agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $submit_agent_id ]); $agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $submit_agent_id ]);
if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){ if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){
Log::write('暂无权限', '7151'); //记录日志
return $this->response("200", "暂无权限!"); return $this->response("200", "暂无权限!");
} }
/*业务员不允许点击查看全部成交报告 end*/ /*业务员不允许点击查看全部成交报告 end*/
if ($is_my_correlation == 0) {//返回空
return $this->response("200", "success");
}
$result = $this->service_->getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword); $result = $this->service_->getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword);
return $this->response("200", "success", $result); return $this->response("200", "success", $result);
} }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api_broker\service; namespace app\api_broker\service;
use app\model\OBargainModel; use app\model\OBargainModel;
use think\Log;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
...@@ -55,7 +56,6 @@ class BargainService ...@@ -55,7 +56,6 @@ class BargainService
$condition["keyword"] = $keyword; $condition["keyword"] = $keyword;
} }
$bargainModel = new OBargainModel(); $bargainModel = new OBargainModel();
$filed = "a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id, $filed = "a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,b.user_name,b.user_id,c.id as order_id,
d.id as house_id,d.internal_title,d.internal_address"; d.id as house_id,d.internal_title,d.internal_address";
......
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