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
aee636e1
Commit
aee636e1
authored
Mar 24, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人客户是否有约带看
parent
8bde05b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
4 deletions
+47
-4
UserLogService.php
application/index/service/UserLogService.php
+5
-0
UserService.php
application/index/service/UserService.php
+28
-0
OReportModel.php
application/model/OReportModel.php
+10
-0
route.php
application/route.php
+4
-4
No files found.
application/index/service/UserLogService.php
View file @
aee636e1
...
...
@@ -303,6 +303,9 @@ class UserLogService
#是否有权限查看vip客户 0:可查看 1:不可查看
$examine_vip
=
$vip_services
->
vip
(
$agent_id
);
#经纪人客户是否有约带看 0:可查看 1:不可查看
$is_report
=
$user_service
->
isReport
(
$agent_id
,
$user_id
);
if
(
((
$is_outpace_call_num
==
0
)
and
(
$is_outstrip_twenty_four_hours
==
1
)
and
(
$is_vip
!=
1
)
)
//过保护期
OR
...
...
@@ -315,6 +318,8 @@ class UserLogService
((
$is_outpace_call_num
==
0
)
and
(
$is_outstrip_twenty_four_hours
==
0
)
and
((
$is_user_agent_boss
==
0
)
or
(
$result_agent_id
==
$agent_id
)
or
(
$called
==
0
)))
OR
((
$is_outpace_call_num
==
1
)
and
((
$is_user_agent_boss
==
0
)
or
(
$result_agent_id
==
$agent_id
)
or
(
$called
==
0
)))
OR
(
$is_report
==
0
)
){
return
0
;
//0:显示
}
else
{
...
...
application/index/service/UserService.php
View file @
aee636e1
...
...
@@ -16,6 +16,7 @@ use app\index\validate\MemberValidate;
use
app\model\AAgents
;
use
app\model\ACollectUser
;
use
app\model\GOperatingRecords
;
use
app\model\OReportModel
;
use
app\model\Users
;
use
app\task\controller\ResultsSummaryNewTask
;
use
think\Log
;
...
...
@@ -371,6 +372,33 @@ class UserService
}
}
/**
* 经纪人客户是否有约带看 0:可查看 1:不可查看
* @param $agent_id
* @param $user_id
* @return int
*/
public
function
isReport
(
$agent_id
,
$user_id
){
if
(
!
$agent_id
or
!
$user_id
){
return
1
;
}
$time
=
time
();
$m_report
=
new
OReportModel
();
$begin_date
=
date
(
"Y-m-d H:i:s"
,
strtotime
(
"-1 week"
));
$end_date
=
date
(
"Y-m-d H:i:s"
,
$time
);
$conditions
[
'report_agent_id'
]
=
$agent_id
;
$conditions
[
'user_id'
]
=
$user_id
;
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$begin_date
,
$end_date
));
$report
=
$m_report
->
selectReportByIdTime
(
'id'
,
$conditions
);
if
(
count
(
$report
)
>
0
)
{
return
0
;
//有约带看
}
else
{
return
1
;
//无约带看
}
}
/**
* 编辑客户详情权限 0:有权限 1:无权限
...
...
application/model/OReportModel.php
View file @
aee636e1
...
...
@@ -1102,6 +1102,16 @@ class OReportModel extends Model
public
function
getFieldValue
(
$field
,
$where
)
{
return
$this
->
db
->
where
(
$where
)
->
value
(
$field
);
}
public
function
selectReportByIdTime
(
$filed
=
"id"
,
$params
)
{
$params
[
"status"
]
=
0
;
return
$this
->
db
->
field
(
$filed
)
->
where
(
$params
)
->
select
();
}
}
...
...
application/route.php
View file @
aee636e1
...
...
@@ -671,10 +671,10 @@ Route::group('broker', [
'addHouseVideo'
=>
[
'api_broker/Shop/addHouseVideo'
,
[
'method'
=>
'post'
]],
//新增商铺视频
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'getCheckType'
=>
[
'api_broker/Report/getCheckType'
,
[
'method'
=>
'get|post'
]
],
'reportListForPc'
=>
[
'api_broker/Report/reportListForPc'
,
[
'method'
=>
'get'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'reportList'
=>
[
'api_broker/Report/reportList'
,
[
'method'
=>
'get'
]
],
'getCheckType'
=>
[
'api_broker/Report/getCheckType'
,
[
'method'
=>
'get|post'
]
],
'reportListForPc'
=>
[
'api_broker/Report/reportListForPc'
,
[
'method'
=>
'get'
]
],
'orderDetail'
=>
[
'api_broker/OrderLog/orderDetail'
,
[
'method'
=>
'get|post'
]
],
'token'
=>
[
'api_broker/broker/token'
,
[
'method'
=>
'get'
]],
...
...
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