Commit 8a0b92e0 authored by hujun's avatar hujun

unset

parent 6341a110
......@@ -148,7 +148,7 @@ class PayLogOpen extends Basic
$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);
$result = $this->service_->getOpenListV2($agent_id, $status, $pageNo, $pageSize);
if (count($result) > 0) {
return $this->response("200", "success", $result);
} else {
......
......@@ -217,6 +217,65 @@ class PayLogOpenService
return $list;
}
/**
* 开业审核列表
*
* @param $agent_id
* @param $status
* @param $pageNo
* @param $pageSize
* @return array|null
*/
public function getOpenListV2($agent_id, $status, $pageNo, $pageSize)
{
$data = [];
$verifyService = new VerifyService();
$agent_ids = $verifyService->getAgentsByAgentPhone($agent_id);
if (empty($agent_ids)) {
return null;
}
$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.name as agent_name,a.intro';
$list = $this->payLogOpenModel->getOpenList($pageNo, $pageSize, 'a.id desc', $fields, $where);
if (!$list) {
return null;
}
foreach($list as $v) {
$open_id[] = $v['id'];
$key = $v['id'];
$data[$key] = $v;
}
if (isset($open_id)) {
$field_log = "id,status,remark,operation_id,operation_name,create_time,open_id";
$log_list = $this->payLogOpenLogModel->getAllList($field_log, 0, ["open_id" => ['in', $open_id]]);
foreach($log_list as $v2) {
$key = $v2['open_id'];
$data[$key]['log_list'][] = $v2;
}
$params["img_id"] = ['in', $open_id];
$params["img_type"] = 5;
$img_arr = $this->oImgModel->getImgList($params, 'id,img_name,img_id');
foreach($img_arr as $v3) {
$key = $v3['img_id'];
$data[$key]['img_path'] = CHAT_IMG_URL;
$data[$key]['img_arr'][] = [
'id'=>$v3['id'],
'img_name'=>$v3['img_name']
];
}
$data = array_values($data);
}
return $data;
}
/**
* bin类
* @param $pay_log_id
......
......@@ -75,9 +75,9 @@ class VerifyService
$agent_data = $s_redis->getRedisCache(2, $agent_id);
$params["phone"] = $agent_data['phone'];
$result = $this->agentModel->searchAgentsByKeyword("id,store_id,district_id,level", $params);
$where['status'] = ['in', '0,3'];
$id_string = '';
foreach ($result as $value) {
$where['status'] = ['in', '0,3'];
switch ($value["level"]) {
case 10:
return $value["id"];
......@@ -106,6 +106,7 @@ class VerifyService
return $agent_id;
break;
}
unset($where);
}
if (isset($id_string)) {
......
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