Commit f9e38f98 authored by zw's avatar zw

订单搜索

parent 4dfc4e19
......@@ -46,19 +46,19 @@ class OrderLog extends Basic
return $this->response("101", "请求参数错误");
}
/* $params = array(
"reception_id" => 1,//带看经纪人id
"report_id" => 1,//报备id
"order_id" =>1, //关联order表id
"order_no" =>"123123123123123", //订单no
"march_in_remark" =>"有意向购买", //进场备注
"march_in_img" =>"123123", //备注图片
"march_in_area" =>"上海市虹口区中山公园", //进场地址
);*/
// $params["reception_id"] = $this->agentName;
$is_ok = $this->o_march_in_model->addMarchIn($params);
/* $params = array(
"reception_id" => 1,//带看经纪人id
"report_id" => 1,//报备id
"order_id" =>1, //关联order表id
"order_no" =>"123123123123123", //订单no
"march_in_remark" =>"有意向购买", //进场备注
"march_in_img" =>"123123", //备注图片
"march_in_area" =>"上海市虹口区中山公园", //进场地址
);*/
// $params["reception_id"] = $this->agentName;
$is_ok = $this->o_march_in_model->addMarchIn($params);
if ($is_ok > 0) {
return $this->response("200", "request success", []);
} else {
......@@ -186,24 +186,25 @@ class OrderLog extends Basic
* 详情页
* @return \think\Response
*/
public function orderDetail(){
public function orderDetail()
{
$params = $this->params;
/*$params = array(
"order_id" => 1,
);*/
if(!isset($params["order_id"])){
if (!isset($params["order_id"])) {
return $this->response("101", "order_id不能为空");
}
$where_["order_id"] = $params["order_id"];
try{
try {
$result = $this->service_->selectOrderDetail($where_);
if(count($result)>0){
return $this->response("200","request success",$result[0]);
}else{
return $this->response("200","request list is null",[]);
if (count($result) > 0) {
return $this->response("200", "request success", $result[0]);
} else {
return $this->response("200", "request list is null", []);
}
}catch (Exception $e){
return $this->response("101","request error,msg:".$e);
} catch (Exception $e) {
return $this->response("101", "request error,msg:" . $e);
}
......@@ -215,15 +216,15 @@ class OrderLog extends Basic
*/
public function selectReportAll()
{
/* $params = $this->params;
$params = $this->params;
if (!isset($params["order_no"])) {
return $this->response("101", "请求参数错误");
}*/
$params = array(
"order_id" => 1,
);
$data = $this->service_->selectListByOrderNo($params["order_id"]);
return $this->response("200","request success",$data);
}
/* $params = array(
"order_id" => 1,
);*/
$data = $this->service_->selectListByOrderNo($params["order_id"]);
return $this->response("200", "request success", $data);
}
......@@ -234,10 +235,10 @@ class OrderLog extends Basic
public function statusBargain()
{
$params = $this->params;
/* $params = array(
"id" => 1,
"type" => 210 //20撤销 21已撤销 30已审核
);*/
/* $params = array(
"id" => 1,
"type" => 210 //20撤销 21已撤销 30已审核
);*/
if (!isset($params["id"])) {
return $this->response("101", "请求参数错误");
}
......@@ -258,25 +259,26 @@ class OrderLog extends Basic
}
}
public function searchOrder(){
public function searchOrder()
{
$params = $this->params;
/* $params = array(
"type" => 3, //1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id"=>1,
"search_keyword" => "123"
);*/
if(!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])){
return $this->response("101","请求参数错误");
/* $params = array(
"type" => 3, //1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id"=>1,
"search_keyword" => "123"
);*/
if (!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])) {
return $this->response("101", "请求参数错误");
}
try{
try {
$result = $this->service_->getSearchOrder($params);
if(count($result) > 0){
return $this->response("200","request success",$result);
}else{
return $this->response("200","request null");
if (count($result) > 0) {
return $this->response("200", "request success", $result);
} else {
return $this->response("200", "request null");
}
}catch (Exception $e){
return $this->response("101","request error,msg:".$e);
} catch (Exception $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