Commit ad15e217 authored by clone's avatar clone

1

parent 2491f204
...@@ -104,5 +104,36 @@ class PayLogOpen extends Basic ...@@ -104,5 +104,36 @@ class PayLogOpen extends Basic
} }
} }
/**
* 获取申请开盘列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getOpenList()
{
$params = $this->params;
/* $params = array(
"agent_id" => 1,
"status" => 0, //0未审核 1总监审核 2财务一审 3财务二审
"page_no" => 1,
"page_size" => 15
);*/
if (!isset($params["agent_id"]) || !isset($params["status"])) {
return $this->response("101", "请求参数错误");
}
$agent_id = $params["agent_id"];
$status = $params["status"];
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->getOpenList($agent_id, $status, $pageNo, $pageSize);
if(count($result) > 0){
return $this->response("200","success",$result);
}else{
return $this->response("200","success",[]);
}
}
} }
\ No newline at end of file
...@@ -62,6 +62,42 @@ class PayLogOpenService ...@@ -62,6 +62,42 @@ class PayLogOpenService
return $num; return $num;
} }
/**
* 获取列表
* @param $agent_id
* @param $status
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getOpenList($agent_id, $status, $pageNo, $pageSize)
{
$verifyService = new VerifyService();
$agent_ids = $verifyService->getAgentsByAgentId($agent_id);
$where['a.agent_id'] = array("in", $agent_ids);
$where['a.status'] = $status;
$where['a.is_del'] = 0;
$fields = 'a.id,a.create_time,a.agent_id,a.pay_log_id,a.bargain_id,a.order_id,a.house_id,a.house_address,
a.status,b.create_time as disc_time,max(b.id) as two_id';
$list = $this->payLogOpenModel->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where);
if(!$list){
return null;
}
foreach ($list as $key => $item) {
$params["img_id"] = $item["id"];
$params["img_type"] = 5;
$img_arr = $this->oImgModel->getImgList($params);
$list[$key]["img_arr"] = $img_arr;
}
return $list;
}
/** /**
* bin类 * bin类
* @param $pay_log_id * @param $pay_log_id
......
...@@ -901,9 +901,10 @@ Route::group('broker', [ ...@@ -901,9 +901,10 @@ Route::group('broker', [
'delSquare' => [ 'api_broker/Square/delSquare', [ 'method' => 'GET|POST' ] ], 'delSquare' => [ 'api_broker/Square/delSquare', [ 'method' => 'GET|POST' ] ],
'getSquareSortList' => [ 'api_broker/Square/getSquareSortList', [ 'method' => 'GET|POST' ] ], 'getSquareSortList' => [ 'api_broker/Square/getSquareSortList', [ 'method' => 'GET|POST' ] ],
'getAgentDistrictId' => [ 'api_broker/Broker/getAgentDistrictId', [ 'method' => 'GET|POST' ] ], 'getAgentDistrictId' => [ 'api_broker/Broker/getAgentDistrictId', [ 'method' => 'GET|POST' ] ],
'getOpenList' => [ 'api_broker/PayLogOpen/getOpenList', [ 'method' => 'GET|POST' ] ],
]); ]);
Route::group('search', [ Route::group('search', [
......
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