Commit f9e38f98 authored by zw's avatar zw

订单搜索

parent 4dfc4e19
...@@ -186,24 +186,25 @@ class OrderLog extends Basic ...@@ -186,24 +186,25 @@ class OrderLog extends Basic
* 详情页 * 详情页
* @return \think\Response * @return \think\Response
*/ */
public function orderDetail(){ public function orderDetail()
{
$params = $this->params; $params = $this->params;
/*$params = array( /*$params = array(
"order_id" => 1, "order_id" => 1,
);*/ );*/
if(!isset($params["order_id"])){ if (!isset($params["order_id"])) {
return $this->response("101", "order_id不能为空"); return $this->response("101", "order_id不能为空");
} }
$where_["order_id"] = $params["order_id"]; $where_["order_id"] = $params["order_id"];
try{ try {
$result = $this->service_->selectOrderDetail($where_); $result = $this->service_->selectOrderDetail($where_);
if(count($result)>0){ if (count($result) > 0) {
return $this->response("200","request success",$result[0]); return $this->response("200", "request success", $result[0]);
}else{ } else {
return $this->response("200","request list is null",[]); return $this->response("200", "request list is null", []);
} }
}catch (Exception $e){ } catch (Exception $e) {
return $this->response("101","request error,msg:".$e); return $this->response("101", "request error,msg:" . $e);
} }
...@@ -215,15 +216,15 @@ class OrderLog extends Basic ...@@ -215,15 +216,15 @@ class OrderLog extends Basic
*/ */
public function selectReportAll() public function selectReportAll()
{ {
/* $params = $this->params; $params = $this->params;
if (!isset($params["order_no"])) { if (!isset($params["order_no"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
}*/ }
$params = array( /* $params = array(
"order_id" => 1, "order_id" => 1,
); );*/
$data = $this->service_->selectListByOrderNo($params["order_id"]); $data = $this->service_->selectListByOrderNo($params["order_id"]);
return $this->response("200","request success",$data); return $this->response("200", "request success", $data);
} }
...@@ -258,25 +259,26 @@ class OrderLog extends Basic ...@@ -258,25 +259,26 @@ class OrderLog extends Basic
} }
} }
public function searchOrder(){ public function searchOrder()
{
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"type" => 3, //1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址 "type" => 3, //1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id"=>1, "agent_id"=>1,
"search_keyword" => "123" "search_keyword" => "123"
);*/ );*/
if(!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])){ if (!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])) {
return $this->response("101","请求参数错误"); return $this->response("101", "请求参数错误");
} }
try{ try {
$result = $this->service_->getSearchOrder($params); $result = $this->service_->getSearchOrder($params);
if(count($result) > 0){ if (count($result) > 0) {
return $this->response("200","request success",$result); return $this->response("200", "request success", $result);
}else{ } else {
return $this->response("200","request null"); return $this->response("200", "request null");
} }
}catch (Exception $e){ } catch (Exception $e) {
return $this->response("101","request error,msg:".$e); return $this->response("101", "request error,msg:" . $e);
} }
......
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