Commit 4de60f5d authored by zw's avatar zw

redis

parent 2239c143
...@@ -73,10 +73,10 @@ class ReportService ...@@ -73,10 +73,10 @@ class ReportService
* @throws \think\db\exception\ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function verifyReport($agent_id,$agent_phone, $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_phone, $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); $predict_see_time);
if ($id > 0) { if ($id > 0) {
...@@ -91,7 +91,7 @@ class ReportService ...@@ -91,7 +91,7 @@ class ReportService
$push->pushReportMessage($v, $agent_id); //推送报备信息 $push->pushReportMessage($v, $agent_id); //推送报备信息
} }
//todo 保存order表 订单返回成功返回报备id //todo 保存order表 订单返回成功返回报备id
return ($this->orderModel->insertOrderByAll($order_arr) > 0) ? $id:0; return ($this->orderModel->insertOrderByAll($order_arr) > 0) ? $id : 0;
} }
} }
...@@ -112,15 +112,18 @@ class ReportService ...@@ -112,15 +112,18 @@ class ReportService
$vModel = new VerifyService(); $vModel = new VerifyService();
$agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]); $agentArr = $vModel->getAgentsByAgentId($params["report_agent_id"]);
if ($agentArr) { if ($agentArr) {
$params["agent_id_s"] = array("in",$agentArr); $params["agent_id_s"] = array( "in", $agentArr );
$params["report_agent_id"] = $agentArr; $params["report_agent_id"] = $agentArr;
} }
$caseHouseId = $vModel->getCaseHouseIdByAgentId($params["agent_id_s"]); $caseHouseId = $vModel->getCaseHouseIdByAgentId($params["agent_id_s"]);
$ids = ""; $ids = "";
foreach ($caseHouseId as $item) { if (count($caseHouseId) > 0) {
$ids .= $item["houses_id"] . ","; foreach ($caseHouseId as $item) {
$ids .= $item["houses_id"] . ",";
}
} }
$ids = rtrim($ids, ","); $ids = rtrim($ids, ",");
$ids = $ids ? $ids : 0; $ids = $ids ? $ids : 0;
$params["house_ids"] = $ids; $params["house_ids"] = $ids;
...@@ -199,22 +202,22 @@ class ReportService ...@@ -199,22 +202,22 @@ class ReportService
* @param $predict_see_time int 时间戳 * @param $predict_see_time int 时间戳
* @return int|string * @return int|string
*/ */
public function reportBin($report_agent_id,$agent_phone , $report_agent_name, $report_store_id, $user_id, $user_phone, $user_name, public function reportBin($report_agent_id, $agent_phone, $report_agent_name, $report_store_id, $user_id, $user_phone, $user_name,
$vehicle, $intro, $predict_see_time) $vehicle, $intro, $predict_see_time)
{ {
$param["report_agent_id"] = $report_agent_id; $param["report_agent_id"] = $report_agent_id;
$param["report_agent_phone"] = $agent_phone; $param["report_agent_phone"] = $agent_phone;
$param["report_agent_name"] = $report_agent_name; $param["report_agent_name"] = $report_agent_name;
$param["report_store_id"] = $report_store_id; $param["report_store_id"] = $report_store_id;
$param["user_id"] = $user_id; $param["user_id"] = $user_id;
$param["user_phone"] = $user_phone; $param["user_phone"] = $user_phone;
$param["user_name"] = $user_name; $param["user_name"] = $user_name;
$param["vehicle"] = $vehicle; $param["vehicle"] = $vehicle;
$param["status"] = 0; $param["status"] = 0;
$param["intro"] = $intro; $param["intro"] = $intro;
$param["predict_see_time"] = date("Y-m-d H:i:s", $predict_see_time); $param["predict_see_time"] = date("Y-m-d H:i:s", $predict_see_time);
$param["create_time"] = date("Y-m-d H:i:s", time()); $param["create_time"] = date("Y-m-d H:i:s", time());
$param["update_time"] = date("Y-m-d H:i:s", time()); $param["update_time"] = date("Y-m-d H:i:s", time());
return $this->reportModel->addReport($param); return $this->reportModel->addReport($param);
} }
......
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