Commit cae95240 authored by clone's avatar clone

1

parent 29edb5f8
......@@ -49,6 +49,17 @@ class PayLogOpenService
return $return_id;
}
/**
* @param $open_id
* @param $status
* @param $remark
* @param $operation_id
* @param $operation_name
* @return int|string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addOpenCheck($open_id, $status, $remark, $operation_id, $operation_name)
{
$id = $this->payLogOpenLogModel->getAllList('open_id', 0, ['status' => $status, 'open_id'=>$open_id]); //检查当前状态是否审核过
......@@ -88,11 +99,13 @@ class PayLogOpenService
$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,c.name as agent_name,b.operation_id,b.operation_name';
$list = $this->payLogOpenModel->getListCheck($pageNo, $pageSize, 'a.id desc', $fields, $where);
a.status,b.name as agent_name';
$list = $this->payLogOpenModel->getOpenList($pageNo, $pageSize, 'a.id desc', $fields, $where);
if (!$list) {
return null;
}
$field_log = "id,status,remark,operation_id,operation_name,create_time";
foreach ($list as $key => $item) {
$params["img_id"] = $item["id"];
$params["img_type"] = 5;
......@@ -100,6 +113,9 @@ class PayLogOpenService
$list[$key]["img_path"] = CHAT_IMG_URL;
$list[$key]["img_arr"] = $img_arr;
$log_list = $this->payLogOpenLogModel->getAllList($field_log, $item["id"], []);
$list[$key]["log_list"] = $log_list;
}
return $list;
}
......
......@@ -59,6 +59,30 @@ class OPayLogOpen extends BaseModel
->select();
}
/**
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getOpenList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '')
{
return $this->db_
->field($field)
->alias('a')
->join('a_agents b', 'a.agent_id=b.id', 'left')
->where($params)
->limit($pageSize)
->page($pageNo)
->order($order_)
->select();
}
/**
* @param string $field
* @param $params
......
......@@ -52,7 +52,8 @@ class OPayLogOpenLog extends BaseModel
$params['id'] = $id;
}
$params['is_del'] = 0;
return $this->db_->field($field)
return $this->db_
->field($field)
->where($params)
->select();
}
......
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