Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
30eaa428
Commit
30eaa428
authored
Jan 10, 2019
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9876972c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+30
-16
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/HomePageLog.php
View file @
30eaa428
...
...
@@ -11,6 +11,8 @@ use app\model\AAgents;
use
app\model\GHouses
;
use
app\model\GHousesFollowUp
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\task\controller\FollowUpTask
;
use
think\Log
;
use
think\Request
;
...
...
@@ -26,12 +28,19 @@ class HomePageLog extends Basic
private
$uPhoneFollowUpModel
;
private
$gHouseFollowUpModel
;
private
$phoneFollowUpTemporary
;
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
uPhoneFollowUpModel
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$date
=
date
(
"Y-m-d"
,
time
());
$t_follow_up_task
=
new
FollowUpTask
();
if
(
!
$t_follow_up_task
->
isExistTable
(
$date
,
$this
->
siteId
)){
return
false
;
}
$this
->
uPhoneFollowUpModel
=
new
UPhoneFollowUp
(
$this
->
siteId
);
$this
->
gHouseFollowUpModel
=
new
GHousesFollowUp
();
$this
->
phoneFollowUpTemporary
=
new
UPhoneFollowUpTemporary
(
$this
->
siteId
);
}
/**
...
...
@@ -44,16 +53,14 @@ class HomePageLog extends Basic
public
function
userFollowUpList
()
{
$params
=
$this
->
params
;
Log
::
write
(
$params
,
'userFollowUpList'
);
//记录日志
/*$params = array(
"start_time" => strtotime('2016-08-14 15:47:36'), //开始时间
"end_time" => strtotime('2018-08-14 15:47:36'), //结束时间
"name_or_phone" => "18112347151",//用户姓名或电话 经纪人
/* $params = array(
"start_time" => strtotime('2018-08-14 15:47:36'), //开始时间
"end_time" => strtotime('2019-01-10 15:47:36'), //结束时间
//"name_or_phone" => "18112347151",//用户姓名或电话 经纪人
"search_content" => "",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
$vrs
=
new
VerifyRepetitionService
();
$is_check
=
$vrs
->
followUpClick
(
$this
->
agentId
);
if
(
$params
[
"pageNo"
]
==
1
&&
!
$is_check
){
...
...
@@ -69,19 +76,24 @@ class HomePageLog extends Basic
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
return
$this
->
response
(
"101"
,
'请选择时间'
);
}
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
"
f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.
user_status"
;
$field
=
"
id,user_id,agent_id,type,content,create_time,
user_status"
;
$where_
=
[];
$where
=
' 1=1 '
;
if
(
!
empty
(
$params
[
"search_content"
]))
{
$where_
[
"f.content"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'search_content'
])
.
"%"
);
$search_content
=
trim
(
$params
[
'search_content'
]);
$where_
[
"f.content"
]
=
array
(
"like"
,
"%"
.
$search_content
.
"%"
);
$where
.=
" AND content LIKE '%
$search_content
%'"
;
}
if
(
!
empty
(
$params
[
"start_time"
])
&&
!
empty
(
$params
[
"end_time"
]))
{
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$where_
[
"f.create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
$where
.=
' AND create_time BETWEEN "'
.
$start_time
.
'" AND "'
.
$end_time
.
'"'
;
}
if
(
!
empty
(
$params
[
"name_or_phone"
]))
{
...
...
@@ -98,16 +110,18 @@ class HomePageLog extends Basic
$res_a
=
$model
->
getAgentsIdsArray
(
$agent_field
,
$agent_params
);
if
(
$res_a
)
{
$where_
[
"f.agent_id"
]
=
[
'in'
,
$res_a
];
$where
.=
" AND agent_id in (
$res_a
)"
;
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
//$where_["f.city"] = trim($this->city) ? trim($this->city) : '上海市';
$order
=
"f.id desc"
;
$result
=
$this
->
uPhoneFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
[],
$where_
,
""
);
$date
=
date
(
"Y-m-d"
,
time
());
if
(
$start_time
>=
$date
&&
$start_time
<=
$date
.
" 23:59:59"
)
{
$result
=
$this
->
phoneFollowUpTemporary
->
getFollowList
(
$pageNo
,
$pageSize
,
$order_
=
'id desc'
,
$field
,
$where_
);
}
else
{
$result
=
$this
->
phoneFollowUpTemporary
->
getFollowListV2
(
$this
->
siteId
,
$pageNo
,
$pageSize
,
$where
,
$field
);
}
$clientService
=
new
ClientService
();
foreach
(
$result
as
$key
=>
$value
)
{
$agent_params
=
[];
...
...
application/route.php
View file @
30eaa428
...
...
@@ -680,6 +680,7 @@ Route::group('broker', [
//首页跟进记录
'userFollowUpList'
=>
[
'api_broker/HomePageLog/userFollowUpList'
,
[
'method'
=>
'post'
]],
'userFollowUpListV2'
=>
[
'api_broker/HomePageLog/userFollowUpListV2'
,
[
'method'
=>
'post|get'
]],
'houseFollowUpList'
=>
[
'api_broker/HomePageLog/houseFollowUpList'
,
[
'method'
=>
'post'
]],
'housingResource'
=>
[
'api_broker/Performance/housingResource'
,
[
'method'
=>
'POST|GET'
]],
//获取房源list
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment