Commit ef898abd authored by zw's avatar zw

name

parent d76bd547
...@@ -19,9 +19,11 @@ class PhoneFollowUpService ...@@ -19,9 +19,11 @@ class PhoneFollowUpService
{ {
private $phoneFollowUp; private $phoneFollowUp;
private $phoneFollowUpTemporary; private $phoneFollowUpTemporary;
private $siteId;
public function __construct($site_id) public function __construct($site_id)
{ {
$this->siteId = $site_id;
$date = date("Y-m-d", time()); $date = date("Y-m-d", time());
$t_follow_up_task = new FollowUpTask(); $t_follow_up_task = new FollowUpTask();
if(!$t_follow_up_task->isExistTable($date, $site_id)){ if(!$t_follow_up_task->isExistTable($date, $site_id)){
...@@ -103,7 +105,7 @@ class PhoneFollowUpService ...@@ -103,7 +105,7 @@ class PhoneFollowUpService
if ($start_time >= $date && $start_time <= $date . " 23:59:59" ) { if ($start_time >= $date && $start_time <= $date . " 23:59:59" ) {
$data = $this->phoneFollowUpTemporary->getFollowList($page_no, $page_size, $order_ = 'id desc', $field, $where); $data = $this->phoneFollowUpTemporary->getFollowList($page_no, $page_size, $order_ = 'id desc', $field, $where);
} else { } else {
$data = $this->phoneFollowUpTemporary->getFollowListV2($page_no, $page_size, $where, $field); $data = $this->phoneFollowUpTemporary->getFollowListV2($this->siteId,$page_no, $page_size, $where, $field);
} }
$s_user_service = new UserService(); $s_user_service = new UserService();
......
...@@ -141,7 +141,7 @@ class UPhoneFollowUpTemporary extends BaseModel ...@@ -141,7 +141,7 @@ class UPhoneFollowUpTemporary extends BaseModel
return $result; return $result;
} }
public function getFollowListV2($pageNo = 1, $pageSize = 15, $where, $filed = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') { public function getFollowListV2($site_id,$pageNo = 1, $pageSize = 15, $where, $filed = '`id`, `user_id`, `create_time`, `content`, `user_status`, `labels_id`, `agent_id`') {
$start_index = ($pageNo - 1) * $pageSize; $start_index = ($pageNo - 1) * $pageSize;
$sql = "SELECT * FROM $sql = "SELECT * FROM
((SELECT ((SELECT
...@@ -154,7 +154,7 @@ class UPhoneFollowUpTemporary extends BaseModel ...@@ -154,7 +154,7 @@ class UPhoneFollowUpTemporary extends BaseModel
(SELECT (SELECT
$filed $filed
FROM FROM
u_phone_follow_up_10001 u_phone_follow_up_$site_id
WHERE WHERE
$where $where
) ) as aa ORDER BY `id` DESC limit $start_index,$pageSize"; ) ) as aa ORDER BY `id` DESC limit $start_index,$pageSize";
......
...@@ -65,6 +65,7 @@ class FollowUpTask ...@@ -65,6 +65,7 @@ class FollowUpTask
return $this->createTemp($phoneFollowUpModel, $table_name); return $this->createTemp($phoneFollowUpModel, $table_name);
} }
} }
return false;
} }
/** /**
......
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