Commit fa9fd55e authored by zhuwei's avatar zhuwei

1

parent b6c7fd4a
......@@ -44,6 +44,45 @@ class Bargain extends Basic
);*/
$checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) {
return $this->response("10111", $checkResult);
}
$pageNo = empty($params["page_no"]) ? 1 : $params["page_no"];
$pageSize = empty($params["page_size"]) ? 15 : $params["page_size"];
$submit_agent_id = $params["submit_agent_id"];
$status = $params["status"];
$is_my_correlation = $params["is_my_correlation"];
$keyword = empty($params["keyword"]) ? "" : $params["keyword"];
$bargain_id = empty($params['bargain_id']) ? '':$params['bargain_id'];
/*业务员不允许点击查看全部成交报告 start*/
$agent_field = "a.level";
$agent_res = $this->agentModel->getAgentsInfoByAgentId($agent_field, [ "agent_id" => $submit_agent_id ]);
if(($agent_res[0]['level'] == 10) && ($is_my_correlation == 0)){
return $this->response("200", "暂无权限!");
}
/*业务员不允许点击查看全部成交报告 end*/
$result = $this->service_->getBargainList($pageNo, $pageSize, $submit_agent_id, $status, $is_my_correlation, $keyword, $bargain_id);
return $this->response("200", "success", $result);
}
public function bargainListV2()
{
$params = $this->params;
/* $params = array(
"submit_agent_id" => 93,
"status" => 1,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
"is_my_correlation" => 1, //是否与我相关 0全部 1与我相关
// "keyword" => "17717536291",
"page_no" => 1,
"page_size" => 10,
"bargain_id" =>10
);*/
$checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) {
return $this->response("10111", $checkResult);
......
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