Commit a18e0a90 authored by zw's avatar zw

bug

parent 5ea05db2
......@@ -8,6 +8,7 @@ use app\api_broker\service\HouseNumUpdateService;
use app\api_broker\service\OrderLogService;
use app\api_broker\service\PushMessageService;
use app\api_broker\service\VerifyRepetitionService;
use app\api_broker\service\VipService;
use app\extra\RedisExt;
use app\model\AAgents;
use app\model\OBargainModel;
......@@ -515,11 +516,11 @@ class OrderLog extends Basic
public function searchOrder()
{
$params = $this->params;
/* $params = array(
"type" => 1, //0.客户电话 1.客户姓名,去掉 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址 6客户编号 7商铺编号
/* $params = array(
"type" => 6, //0.客户电话 1.客户姓名,去掉 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址 6客户编号 7商铺编号
"agent_id" => 4022,
"is_all" => 1,//0自己的,1全部
"search_keyword" => "",
"search_keyword" => "123",
"page_no"=>1,
"page_size"=>15
);*/
......@@ -537,6 +538,11 @@ class OrderLog extends Basic
try {
$result = [];
if(isset($params["is_all"]) && $params["is_all"] == 1){
$vip = new VipService();
$check = $vip->vip($this->agentId, 'index/inspectionRecordAll');
if ($check) {
return $this->response(101, "暂无权限");
}
$result = $this->service_->getSearchOrderByAll($params,$pageNo,$pageSize);
}else{
$result = $this->service_->getSearchOrder($params,$pageNo,$pageSize);
......
......@@ -1068,7 +1068,7 @@ class OrderLogService
$orderModel = new OrderModel();
$result = $orderModel->searchOrder($field, $condition, $where_,$pageNo,$pageSize);
$result = $orderModel->searchOrderAll($field, $condition, $where_,$pageNo,$pageSize);
$ids_str = "";
if (count($result) <= 0) {
......
......@@ -142,10 +142,36 @@ class OrderModel extends Model
) AS aaa order by aaa.id desc LIMIT $start_index,$pageSize";
$result = $this->db_->query($sql);
//echo $this->getLastSql();
return $result;
}
/**
* @param $field
* @param $params
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function searchOrderAll($field, $params,$pageNo,$pageSize)
{
return $this
->field($field)
->alias("a")
->join("o_report b","a.f_id = b.id","left")
->where($params)
->order("id desc")
->page($pageNo)
->limit($pageSize)
->select();
}
/**
* @param $field
* @param $order_id
......
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