Commit af219df2 authored by clone's avatar clone

bug

parent 1f42af9e
......@@ -27,17 +27,17 @@ class Bargain extends Basic
{
$params = $this->params;
/* $params = array(
"submit_agent_id" => 1,
"status" => 0,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
$params = array(
"submit_agent_id" => 93,
"status" => 1,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
"is_my_correlation" => 1, //是否与我相关 0全部 1与我相关
"keyword" => "17717536291",
// "keyword" => "17717536291",
"page_no" => 1,
"page_size" => 15
);*/
"page_size" => 10
);
$checkResult = $this->validate($params, "BargainValidate.bargainList");
if (true !== $checkResult) {
return $this->response("300", $checkResult);
return $this->response("101", $checkResult);
}
$pageNo = empty($params["page_no"]) ? 1 : $params["page_no"];
$pageSize = empty($params["page_size"]) ? 15 : $params["page_size"];
......@@ -46,7 +46,7 @@ class Bargain extends Basic
$is_my_correlation = $params["is_my_correlation"];
$keyword = empty($params["keyword"]) ? "" : $params["keyword"];
$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);
}
......
......@@ -73,7 +73,7 @@ class BargainService
if ($is_my_correlation == 1) {
$list = [];
foreach ($result as $k => $v) {
$father_id = $v["father_id"];
$father_id = $v["father_id"] == 0 ? $v["id"] : $v["father_id"];
if ($father_id > 0 && in_array($father_id, $list)) {
unset($result[$k]);
} else {
......
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