Commit c49ca904 authored by zw's avatar zw

bug

parent 60cc847b
...@@ -83,6 +83,34 @@ class UserLog extends Basic{ ...@@ -83,6 +83,34 @@ class UserLog extends Basic{
} }
/**
* 电话跟进
* @return \think\Response
*/
public function followUpLogNew(){
$params = $this->params;
/* $params = array(
"user_id" => 828,
"page_no" => 1,
"page_size" => 15
);*/
if (!isset($params['user_id'])) {
return $this->response("101", "参数不全");
}
$user_id = $params['user_id'];
$pageNo = empty($params['page_no']) ? 1 : $params['page_no'];
$pageSize = empty($params['page_size']) ? 15 : $params['page_size'];
$result = $this->service_->phoneFollowUpNew($user_id,$this->siteId,$pageNo,$pageSize);
if(count($result) > 0){
return $this->response("200", "success!", $result);
}else{
return $this->response("101", "请求数据为空");
}
}
/** /**
* 电话跟进 * 电话跟进
* @return \think\Response * @return \think\Response
......
...@@ -199,10 +199,9 @@ class UserLogService ...@@ -199,10 +199,9 @@ class UserLogService
* @param $page_no * @param $page_no
* @param $page_size * @param $page_size
*/ */
public function phoneFollowUp($user_id, $site_id, $page_no, $page_size) public function phoneFollowUpNew($user_id, $site_id, $page_no, $page_size)
{ {
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进 // $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$uPhoneFollowModel = new UPhoneFollowUp($site_id);
$uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id); $uPhoneFollowTempModel = new UPhoneFollowUpTemporary($site_id);
//电话跟进 //电话跟进
$userParams["user_id"] = $user_id; $userParams["user_id"] = $user_id;
...@@ -210,9 +209,18 @@ class UserLogService ...@@ -210,9 +209,18 @@ class UserLogService
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img"; $field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img";
$bargainData = $uPhoneFollowTempModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size); $bargainData = $uPhoneFollowTempModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
if(count($bargainData) <= 0){ return $bargainData;
$bargainData = $uPhoneFollowModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size); }
} public function phoneFollowUp($user_id, $site_id, $page_no, $page_size)
{
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$uPhoneFollowModel = new UPhoneFollowUp($site_id);
//电话跟进
$userParams["user_id"] = $user_id;
$field_user_follow = "a.id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img";
$bargainData = $uPhoneFollowModel->getFollowUpList($field_user_follow, $userParams,$page_no,$page_size);
return $bargainData; return $bargainData;
} }
......
...@@ -396,6 +396,7 @@ Route::group('index', [ ...@@ -396,6 +396,7 @@ Route::group('index', [
'userDetail' => ['index/UserLog/userDetail', ['method' => 'get|post']], 'userDetail' => ['index/UserLog/userDetail', ['method' => 'get|post']],
'userLog' => ['index/UserLog/userLog', ['method' => 'get|post']], 'userLog' => ['index/UserLog/userLog', ['method' => 'get|post']],
'followUpLog' => ['index/UserLog/followUpLog', ['method' => 'get|post']], 'followUpLog' => ['index/UserLog/followUpLog', ['method' => 'get|post']],
'followUpLogNew' => ['index/UserLog/followUpLogNew', ['method' => 'get|post']],
'dailyDetail' => ['index/DailyPaper/dailyDetail', ['method' => 'get|post']], 'dailyDetail' => ['index/DailyPaper/dailyDetail', ['method' => 'get|post']],
'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']], 'addDaily' => ['index/DailyPaper/addDaily', ['method' => 'get|post']],
......
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