Commit 6961c476 authored by clone's avatar clone

bug

parent b52e4a4d
......@@ -285,11 +285,11 @@ class OrderLog extends Basic
public function searchOrder()
{
$params = $this->params;
/* $params = array(
$params = array(
"type" => 4, //0.客户电话 1.客户姓名 2.报备人电话 3.报备人姓名 4.商铺名称 5.商铺地址
"agent_id" => 8735,
"search_keyword" => "郑州"
);*/
"agent_id" => 1,
"search_keyword" => "福气"
);
if (!isset($params["type"]) || !isset($params["agent_id"]) || !isset($params["search_keyword"])) {
return $this->response("101", "请求参数错误");
}
......
......@@ -36,13 +36,14 @@ class Report extends Basic
public function report()
{
$params = $this->params;
if (!isset($params['report_agent_id']) || !isset($params['report_store_id']) || !isset($params['user_id']) ||
if (!isset($params['report_agent_id']) || !isset($params['report_agent_phone']) || !isset($params['report_store_id']) || !isset($params['user_id']) ||
!isset($params['house_ids']) || !isset($params['vehicle'])) {
return $this->response("101", "请求参数错误");
}
/* $params = array(
"report_agent_id" => 1,//报备经纪人id
"report_agent_phone" => '13817616471',//报备经纪人id
"report_store_id" => 1,//门店id
"user_id" => 1,//用户id
"house_ids" => "1,2,3",//楼盘id
......@@ -54,6 +55,7 @@ class Report extends Basic
$agent_id = $params["report_agent_id"];
$agent_phone = $params["report_agent_phone"];
$store_id = $params["report_store_id"];
$user_id = $params["user_id"];
$house_ids = $params["house_ids"];
......@@ -66,7 +68,7 @@ class Report extends Basic
if (!$userArr) {
return $this->response("101", "不存在此用户");
}
$is_ok = $this->service_->verifyReport($agent_id, $this->agentName, $store_id, $user_id, $userArr["user_phone"],
$is_ok = $this->service_->verifyReport($agent_id, $agent_phone, $this->agentName, $store_id, $user_id, $userArr["user_phone"],
$userArr["user_name"], $house_ids, $vehicle, $intro, $predict_see_time);
if ($is_ok > 0) {
return $this->response("200", "request success", []);
......@@ -110,7 +112,6 @@ class Report extends Basic
}
}
......
......@@ -212,7 +212,7 @@ class OrderLogService
}
$report_id = $orderData[0]["f_id"];
$field_report = "id,report_agent_id,report_agent_name,report_store_id,user_id,user_phone,user_name,vehicle,intro,predict_see_time,create_time";
$field_report = "id,report_agent_id,report_agent_phone,report_agent_name,report_store_id,user_id,user_phone,user_name,vehicle,intro,predict_see_time,create_time";
$reportData = $oReportModel->selectReportById($field_report, [ "id" => $report_id ]);
if (count($reportData) == 0) {
......@@ -238,8 +238,6 @@ class OrderLogService
$followUpLogData = $followUpLogModel->selectFollowUpListByReportId($field_follow_up, [ "report_id" => $report_id ]);
if (count($followUpLogData) > 0) {
foreach ($followUpLogData as $k => $v) {
$v["step_name"] = "follow_up_log";
$result[$sort++] = $v;
}
......
......@@ -54,6 +54,7 @@ class ReportService
* 生成报备和保存订单
*
* @param $agent_id
* @param $agent_phone
* @param $agent_name
* @param $store_id
* @param $user_id
......@@ -68,10 +69,10 @@ class ReportService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function verifyReport($agent_id, $agent_name, $store_id, $user_id, $user_phone, $user_name, $house_ids, $vehicle, $intro, $predict_see_time)
public function verifyReport($agent_id,$agent_phone, $agent_name, $store_id, $user_id, $user_phone, $user_name, $house_ids, $vehicle, $intro, $predict_see_time)
{
$id = $this->reportBin($agent_id, $agent_name, $store_id, $user_id, $user_phone, $user_name, $vehicle, $intro,
$id = $this->reportBin($agent_id,$agent_phone, $agent_name, $store_id, $user_id, $user_phone, $user_name, $vehicle, $intro,
$predict_see_time);
if ($id > 0) {
......@@ -183,6 +184,7 @@ class ReportService
/**报备主表
* @param $report_agent_id
* @param $agent_phone
* @param $report_agent_name
* @param $report_store_id
* @param $user_id
......@@ -193,10 +195,11 @@ class ReportService
* @param $predict_see_time
* @return array
*/
private function reportBin($report_agent_id, $report_agent_name, $report_store_id, $user_id, $user_phone, $user_name,
private function reportBin($report_agent_id,$agent_phone , $report_agent_name, $report_store_id, $user_id, $user_phone, $user_name,
$vehicle, $intro, $predict_see_time)
{
$param["report_agent_id"] = $report_agent_id;
$param["report_agent_phone"] = $agent_phone;
$param["report_agent_name"] = $report_agent_name;
$param["report_store_id"] = $report_store_id;
$param["user_id"] = $user_id;
......
......@@ -110,7 +110,9 @@ class OrderModel extends Model
->union('SELECT '.$field.' FROM o_order a left join o_report b on a.f_id = b.id where '.$params)
->where($params)
->select();*/
/* dump($params);
dump($where_);*/
$where_ = $where_ ." and " . $params;
$sql = "SELECT * FROM
(
(
......
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