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
29c78a60
Commit
29c78a60
authored
Nov 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增经纪人优化
parent
4b55f4f3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
BrokerService.php
application/index/service/BrokerService.php
+19
-1
No files found.
application/index/service/BrokerService.php
View file @
29c78a60
...
...
@@ -59,8 +59,8 @@ class BrokerService
try
{
$field
=
'id,name,phone,sex,img,status,inviter_id,admin_off,quit_time,password,site_id,district_id,store_id,auth_group_id,level'
;
$agent_old
=
$this
->
m_agent
->
getAgentById
(
$field
,
[
'phone'
=>
$data
[
'phone'
],
'status'
=>
0
]);
if
(
empty
(
$data
[
'id'
]))
{
$agent_old
=
$this
->
m_agent
->
getAgentById
(
$field
,
[
'phone'
=>
$data
[
'phone'
]]);
$where
[
'phone'
]
=
$data
[
'phone'
];
$where
[
'site_id'
]
=
$data
[
'site_id'
];
$agent_data
=
$this
->
m_agent
->
verifyUser
(
$field
,
''
,
$where
);
...
...
@@ -70,6 +70,23 @@ class BrokerService
return
$result
;
}
if
(
$agent_data
[
'status'
]
==
3
)
{
$result
[
'msg'
]
=
'该用户已转勤,请通过编辑经纪人。'
;
return
$result
;
}
$status
=
0
;
foreach
(
$agent_old
as
$k
=>
$v
)
{
if
(
$v
[
'status'
]
==
0
)
{
$status
=
1
;
}
}
if
(
$status
)
{
$result
[
'msg'
]
=
'帐号存在离职或长假,请将需要转勤帐号转为正常。'
;
return
$result
;
}
if
(
empty
(
$data
[
'confirm_old'
])
&&
(
!
empty
(
$agent_old
[
0
][
'id'
])
||
$agent_data
[
'status'
]
==
3
))
{
$result
[
'msg'
]
=
'转勤'
;
return
$result
;
...
...
@@ -95,6 +112,7 @@ class BrokerService
$new_site_id
=
$m_district
->
getDistrictKeyById
(
'site_id'
,
[
'id'
=>
$data
[
'district_id'
]]);
}
else
{
$agent_old
=
$this
->
m_agent
->
getAgentById
(
$field
,
[
'phone'
=>
$data
[
'phone'
],
'status'
=>
0
]);
$where
[
'id'
]
=
$data
[
'id'
];
$agent_data
=
$this
->
m_agent
->
verifyUser
(
$field
,
''
,
$where
);
...
...
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