Commit a5e252e4 authored by zhuwei's avatar zhuwei

bug

parent 3fab081d
......@@ -510,7 +510,8 @@ class Performance extends Basic
if ($result["code"] == 101) {
return $this->response("101", $result["date"]);
} else {
return $this->response("200", "success", $result["date"]);
// return $this->response("200", "success", $result["date"]);
return $this->response("200", "success", [ "date" => $result["date"] , "total" => $result["total"] ]);
}
}
......
......@@ -701,11 +701,12 @@ class PerformanceService
return [ "code" => 101, "date" => "传入的参数错误" ];
$field = "a.id,c.user_name,c.user_phone,c.predict_see_time,c.report_agent_name,b.house_title,b.create_time,e.store_name,b.id as order_id";
$addMarchInList = $this->marchInModel->getAddMarchInListPcInfo($params, $field, $page_no, $page_size);
$addMarchInListTotal = $this->marchInModel->getAddMarchInListPcInfoTotal($params, $field);
//获取图片信息
foreach ($addMarchInList as $key => $val) {
$addMarchInList[$key]["user_phone"] = preg_replace('/(\d{3})\d{4}(\d{4})/', '$1****$2', $val["user_phone"]);
}
return [ "code" => 200, "date" => $addMarchInList ];
return [ "code" => 200, "date" => $addMarchInList , "total" => $addMarchInListTotal ];
}
......
......@@ -274,6 +274,28 @@ class OMarchInModel extends Model
->select();
}
public function getAddMarchInListPcInfoTotal($params, $field)
{
$where_ = [];
if (isset($params["agent_id"])) {
$where_["a.reception_id"] = $params["agent_id"];
}
if (isset($params["create_time"])) {
$where_["a.create_time"] = $params["create_time"];
}
if (isset($params["house_ids"])) {
$where_["b.house_id"] = array( "in", $params["house_ids"] );
}
return Db::table($this->table)
->field($field)
->alias("a")
->join("o_order b", "a.order_id = b.id", "left")
->join("o_report c", "b.f_id = c.id", "left")
->join('a_store e', 'c.report_store_id = e.id', 'left')
->where($where_)
->count();
}
public function getAddMarchInOrderList($field, $params)
{
$where_ = [];
......
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