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
1c41dcd0
Commit
1c41dcd0
authored
May 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否已经存在客户邀请人
parent
2d228205
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
14 deletions
+26
-14
Member.php
application/api/controller/Member.php
+6
-0
ImageDepot.php
application/index/controller/ImageDepot.php
+5
-14
UserService.php
application/index/service/UserService.php
+15
-0
No files found.
application/api/controller/Member.php
View file @
1c41dcd0
...
@@ -586,6 +586,12 @@ class Member extends Basic
...
@@ -586,6 +586,12 @@ class Member extends Basic
return
$this
->
response
(
101
,
'参数缺失'
,
''
);
return
$this
->
response
(
101
,
'参数缺失'
,
''
);
}
}
$s_index_user
=
new
UserService
();
$s_index_user
=
new
UserService
();
$v_user
=
$s_index_user
->
verifyUserInvite
(
$params
[
'user_id'
]);
if
(
!
$v_user
){
return
$this
->
response
(
"300"
,
"已存在邀请人"
);
}
$result
=
$s_index_user
->
userInvite
(
$params
[
'user_id'
],
$params
[
'phone'
]);
$result
=
$s_index_user
->
userInvite
(
$params
[
'user_id'
],
$params
[
'phone'
]);
switch
(
$result
)
{
switch
(
$result
)
{
...
...
application/index/controller/ImageDepot.php
View file @
1c41dcd0
...
@@ -13,6 +13,7 @@ use app\model\AAgents;
...
@@ -13,6 +13,7 @@ use app\model\AAgents;
use
app\model\GBusinessDistrict
;
use
app\model\GBusinessDistrict
;
use
app\model\GImageDepot
;
use
app\model\GImageDepot
;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
use
app\model\Users
;
use
think\Cache
;
use
think\Cache
;
use
think\Log
;
use
think\Log
;
...
@@ -182,20 +183,10 @@ class ImageDepot extends Basic
...
@@ -182,20 +183,10 @@ class ImageDepot extends Basic
public
function
ceshi
()
public
function
ceshi
()
{
{
// $user_service = new UserService();
$user
=
$this
->
user
=
new
Users
();
// $agent_id = 6446;
$user_id
=
89
;
// $user_id = 89;
$user_info
=
$user
->
getUserById
(
$field
=
'referrer_id'
,
$user_id
);
//
dump
(
$user_info
[
'referrer_id'
]);
// $is_report = $user_service->isReport($agent_id,$user_id);
// dump($is_report);
// big_log('cehsi');
$user_service
=
new
UserService
();
$data
[
'is_can_look'
]
=
$user_service
->
isUserAgentDirector
(
55
,
51
);
dump
(
$data
);
}
}
...
...
application/index/service/UserService.php
View file @
1c41dcd0
...
@@ -873,4 +873,18 @@ class UserService
...
@@ -873,4 +873,18 @@ class UserService
}
}
}
}
/**
* 判断是否已经存在客户邀请人
* @param $user_id
* @return bool
*/
public
function
verifyUserInvite
(
$user_id
)
{
$user_info
=
$this
->
user
->
getUserById
(
$field
=
'referrer_id'
,
$user_id
);
if
(
$user_info
[
'referrer_id'
]
>
0
){
return
false
;
}
return
true
;
}
}
}
\ No newline at end of file
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