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
9fa9f03f
Commit
9fa9f03f
authored
Jun 12, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9f160126
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
178 additions
and
9 deletions
+178
-9
OfficeUser.php
application/api_broker/controller/OfficeUser.php
+66
-0
OfficeRemark.php
application/index/controller/OfficeRemark.php
+0
-3
OfficeUserLog.php
application/index/controller/OfficeUserLog.php
+47
-0
OfficeUserLogService.php
application/index/service/OfficeUserLogService.php
+59
-0
route.php
application/route.php
+6
-6
No files found.
application/api_broker/controller/OfficeUser.php
0 → 100644
View file @
9fa9f03f
<?php
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\UserExpiredTimeService
;
use
app\api_broker\service\VipService
;
use
app\index\service\OfficeUserLogService
;
use
app\index\service\UserLogService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\GOperatingRecords
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowPp
;
use
app\model\UPhoneFollowUp
;
use
app\model\Users
;
use
think\Log
;
use
think\Request
;
class
OfficeUser
extends
Basic
{
private
$userModel
;
private
$userLogService
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
userModel
=
new
Users
();
$this
->
userLogService
=
new
OfficeUserLogService
();
}
/**
* 电话跟进
* @return \think\Response
*/
public
function
followUpLog
(){
$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
->
userLogService
->
phoneFollowUp
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"请求数据为空"
);
}
}
}
\ No newline at end of file
application/index/controller/OfficeRemark.php
View file @
9fa9f03f
...
@@ -37,9 +37,6 @@ class OfficeRemark extends Basic
...
@@ -37,9 +37,6 @@ class OfficeRemark extends Basic
*/
*/
public
function
followUpList
()
public
function
followUpList
()
{
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'remark_follow_index'
);
}
if
(
!
strtotime
(
$this
->
params
[
'start_date'
])
||
!
strtotime
(
$this
->
params
[
'end_date'
]))
{
if
(
!
strtotime
(
$this
->
params
[
'start_date'
])
||
!
strtotime
(
$this
->
params
[
'end_date'
]))
{
return
$this
->
response
(
101
,
'时间格式错误'
,
[]);
return
$this
->
response
(
101
,
'时间格式错误'
,
[]);
...
...
application/index/controller/OfficeUserLog.php
0 → 100644
View file @
9fa9f03f
<?php
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\service\OfficeUserLogService
;
use
think\Request
;
class
OfficeUserLog
extends
Basic
{
private
$service_
;
public
function
__construct
(
Request
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
OfficeUserLogService
();
}
/**
* 电话跟进
* @return \think\Response
*/
public
function
followUpLog
(){
$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_
->
phoneFollowUp
(
$user_id
,
$this
->
siteId
,
$pageNo
,
$pageSize
);
if
(
count
(
$result
)
>
0
){
return
$this
->
response
(
"200"
,
"success!"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"请求数据为空"
);
}
}
}
\ No newline at end of file
application/index/service/OfficeUserLogService.php
0 → 100644
View file @
9fa9f03f
<?php
namespace
app\index\service
;
use
app\api_broker\service\CallPhoneService
;
use
app\api_broker\service\ClientService
;
use
app\api_broker\service\OrderLogService
;
use
app\api_broker\service\RedisCacheService
;
use
app\api_broker\service\VipService
;
use
app\extra\RedisExt
;
use
app\model\AAgents
;
use
app\model\AAgentsPhone
;
use
app\model\ACollectUser
;
use
app\model\ASite
;
use
app\model\GOperatingRecords
;
use
app\model\OfficePhoneFollowUp
;
use
app\model\OReportModel
;
use
app\model\ULabels
;
use
app\model\UPhoneFollowUp
;
use
app\model\UPhoneFollowUpTemporary
;
use
app\model\Users
;
class
OfficeUserLogService
{
private
$agentModel
;
private
$userModel
;
private
$orderService
;
public
function
__construct
()
{
$this
->
agentModel
=
new
AAgents
();
$this
->
userModel
=
new
Users
();
$this
->
orderService
=
new
OrderLogService
();
}
public
function
phoneFollowUp
(
$user_id
,
$site_id
,
$page_no
,
$page_size
)
{
// $userParams["type"] = 0; //电话跟进 $userParams["type"] = 1; //普通跟进
$m_label
=
new
ULabels
();
$label_data
=
$m_label
->
getColumn
(
'id,name'
,
[
'type'
=>
1
]);
//获取标签
$m_office_phone_follow_up
=
new
OfficePhoneFollowUp
(
$site_id
);
//电话跟进
$userParams
[
"user_id"
]
=
$user_id
;
$field_user_follow
=
"a.id,a.labels_id,a.content,a.user_id,a.agent_id,a.type,a.create_time,a.user_status,b.name,b.phone,b.img"
;
$bargainData
=
$m_office_phone_follow_up
->
getFollowUpList
(
$field_user_follow
,
$userParams
,
$page_no
,
$page_size
);
foreach
(
$bargainData
as
$k
=>
$v
)
{
$bargainData
[
$k
][
'label_name'
]
=
array_key_exists
(
$v
[
'labels_id'
],
$label_data
)
?
'【'
.
$label_data
[
$v
[
'labels_id'
]]
.
'】'
:
''
;
}
return
$bargainData
;
}
}
\ No newline at end of file
application/route.php
View file @
9fa9f03f
...
@@ -1006,12 +1006,11 @@ Route::group('office', [
...
@@ -1006,12 +1006,11 @@ Route::group('office', [
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
'bargainMain'
=>
[
'api_broker/OfficeBargain/bargainList'
,
[
'method'
=>
'POST|GET'
]],
'bargainMainV2'
=>
[
'api_broker/OfficeBargain/bargainListV2'
,
[
'method'
=>
'POST|GET'
]],
'bargainMainV2'
=>
[
'api_broker/OfficeBargain/bargainListV2'
,
[
'method'
=>
'POST|GET'
]],
'userFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/userFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'userFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/userFollowUpList'
,
[
'method'
=>
'POST|GET'
]
],
'houseFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/houseFollowUpList'
,
[
'method'
=>
'POST|GET'
]],
'houseFollowUpList'
=>
[
'api_broker/OfficeHomePageLog/houseFollowUpList'
,
[
'method'
=>
'POST|GET'
]
],
'collectionListByBargainId'
=>
[
'api_broker/OfficePerformance/collectionListByBargainId'
,
[
'method'
=>
'POST|GET'
]
],
'collectionListByBargainId'
=>
[
'api_broker/OfficePerformance/collectionListByBargainId'
,
[
'method'
=>
'POST|GET'
]],
'getOfficeRoomByReport'
=>
[
'api_broker/OfficeRoom/getOfficeRoomByReport'
,
[
'method'
=>
'get|post'
]
],
'followUpLog'
=>
[
'api_broker/OfficeUser/followUpLog'
,
[
'method'
=>
'get|post'
]
],
'getOfficeRoomByReport'
=>
[
'api_broker/OfficeRoom/getOfficeRoomByReport'
,
[
'method'
=>
'get|post'
]],
]);
]);
...
@@ -1042,6 +1041,7 @@ Route::group('office_index', [
...
@@ -1042,6 +1041,7 @@ Route::group('office_index', [
'getExclusive'
=>
[
'index/OfficeRoom/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'getExclusive'
=>
[
'index/OfficeRoom/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'del'
=>
[
'index/OfficeRoom/del'
,
[
'method'
=>
'POST'
]],
//设置无效房源
'del'
=>
[
'index/OfficeRoom/del'
,
[
'method'
=>
'POST'
]],
//设置无效房源
'isShow'
=>
[
'index/OfficeRoom/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'isShow'
=>
[
'index/OfficeRoom/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'followUpList'
=>
[
'index/OfficeRemark/followUpList'
,
[
'method'
=>
'POST|GET'
]],
]);
]);
Route
::
group
(
'office_api'
,
[
Route
::
group
(
'office_api'
,
[
...
...
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