Commit f9e38f98 authored by zw's avatar zw

订单搜索

parent 4dfc4e19
...@@ -46,19 +46,19 @@ class OrderLog extends Basic ...@@ -46,19 +46,19 @@ class OrderLog extends Basic
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
/* $params = array( /* $params = array(
"reception_id" => 1,//带看经纪人id "reception_id" => 1,//带看经纪人id
"report_id" => 1,//报备id "report_id" => 1,//报备id
"order_id" =>1, //关联order表id "order_id" =>1, //关联order表id
"order_no" =>"123123123123123", //订单no "order_no" =>"123123123123123", //订单no
"march_in_remark" =>"有意向购买", //进场备注 "march_in_remark" =>"有意向购买", //进场备注
"march_in_img" =>"123123", //备注图片 "march_in_img" =>"123123", //备注图片
"march_in_area" =>"上海市虹口区中山公园", //进场地址 "march_in_area" =>"上海市虹口区中山公园", //进场地址
);*/ );*/
// $params["reception_id"] = $this->agentName; // $params["reception_id"] = $this->agentName;
$is_ok = $this->o_march_in_model->addMarchIn($params); $is_ok = $this->o_march_in_model->addMarchIn($params);
if ($is_ok > 0) { if ($is_ok > 0) {
return $this->response("200", "request success", []); return $this->response("200", "request success", []);
} else { } else {
...@@ -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);
} }
...@@ -234,10 +235,10 @@ class OrderLog extends Basic ...@@ -234,10 +235,10 @@ class OrderLog extends Basic
public function statusBargain() public function statusBargain()
{ {
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"id" => 1, "id" => 1,
"type" => 210 //20撤销 21已撤销 30已审核 "type" => 210 //20撤销 21已撤销 30已审核
);*/ );*/
if (!isset($params["id"])) { if (!isset($params["id"])) {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -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