Commit efcde645 authored by zw's avatar zw

订单搜索

parent f0c0a6d0
......@@ -267,9 +267,9 @@ class OrderLog extends Basic
{
$params = $this->params;
/* $params = array(
"type" => 3, //1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"type" => 0, //0.客户电话 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id"=>630,
"search_keyword" => "1"
"search_keyword" => "14444"
);*/
if (!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])) {
return $this->response("101", "请求参数错误");
......
......@@ -283,6 +283,9 @@ class OrderLogService
$field = "a.id,a.order_no,a.f_id,a.house_id,a.house_title,b.report_agent_id,b.report_agent_phone,b.report_agent_name,
b.user_id,b.user_phone,b.user_name,b.predict_see_time";
switch ((int)$params["type"]){
case 0:
$condition["b.user_phone"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
break;
case 1:
$condition["b.user_name"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
break;
......@@ -296,7 +299,8 @@ class OrderLogService
$condition["b.house_title"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
break;
case 5:
// $condition["b.house_title"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
//todo 列表没有显示商铺地址 和产品沟通暂时搁置
//$condition["c.house_title"] = array( 'like', "%" . trim($params['search_keyword']) . "%" );
break;
default:
return ["code"=>"101","msg"=>"搜索类型错误"];
......
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