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
068a32a3
Commit
068a32a3
authored
Jan 17, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户邀请人
parent
fefdddab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
0 deletions
+53
-0
BrokerService.php
application/api_broker/service/BrokerService.php
+4
-0
UserService.php
application/index/service/UserService.php
+30
-0
AAgents.php
application/model/AAgents.php
+10
-0
Users.php
application/model/Users.php
+9
-0
No files found.
application/api_broker/service/BrokerService.php
View file @
068a32a3
...
...
@@ -106,4 +106,7 @@ class BrokerService
}
}
\ No newline at end of file
application/index/service/UserService.php
View file @
068a32a3
...
...
@@ -652,5 +652,34 @@ class UserService
}
/**
* 客户邀请人
* @param $phone
* @return int
*/
public
function
userInvite
(
$phone
)
{
$m_agent
=
new
AAgents
();
// 判断经纪人表是否存在
$agent_res
=
$m_agent
->
findByOne
(
'id'
,
[
"phone"
=>
$phone
,
"status"
=>
0
]);
// 判断客户表是否存在
$user_res
=
$this
->
user
->
findByOne
(
'id'
,
[
"user_phone"
=>
$phone
,
"status"
=>
0
]);
if
(
!
$agent_res
&&
!
$user_res
){
return
4
;
}
if
(
$agent_res
){
//todo 邀请人 为 经纪人 经纪人表客户表同时存在
return
4
;
}
else
{
//todo 邀请人 为 经纪人 只存在于客户表
return
4
;
}
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
068a32a3
...
...
@@ -1571,4 +1571,13 @@ class AAgents extends BaseModel
return
$result
;
}
public
function
findByOne
(
$field
,
$params
)
{
$result
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
find
();
//dump($this->getLastSql());
return
$result
;
}
}
\ No newline at end of file
application/model/Users.php
View file @
068a32a3
...
...
@@ -1020,5 +1020,14 @@ class Users extends Model
return
$data
;
}
public
function
findByOne
(
$field
,
$params
)
{
$result
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
find
();
//dump($this->getLastSql());
return
$result
;
}
}
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