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
d9239b18
Commit
d9239b18
authored
Aug 22, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
238410c4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
Broker.php
application/api_broker/controller/Broker.php
+43
-0
AAgents.php
application/model/AAgents.php
+1
-1
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Broker.php
View file @
d9239b18
...
@@ -1220,5 +1220,47 @@ class Broker extends Basic
...
@@ -1220,5 +1220,47 @@ class Broker extends Basic
return
$this
->
response
(
$code
,
$msg
);
return
$this
->
response
(
$code
,
$msg
);
}
}
/**
* 查询经纪人的监管人
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSuperintendent
()
{
$agent_id
=
$this
->
request
->
param
(
"agent_id"
);
if
(
!
$agent_id
)
{
return
$this
->
response
(
101
,
'经纪人id不能为空'
);
}
$redisCache
=
new
RedisCacheService
();
$agentInfo
=
$redisCache
->
getRedisCache
(
2
,
$agent_id
);
$result
[
"superintendent_name"
]
=
""
;
$params
=
[];
if
(
$agentInfo
[
"level"
]
==
10
)
{
$params
[
"store_id"
]
=
$agentInfo
[
"store_id"
];
$params
[
"level"
]
=
array
(
"in"
,
"20,40"
);
$params
[
"status"
]
=
0
;
}
else
if
(
$agentInfo
[
"level"
]
==
20
)
{
$params
[
"district_id"
]
=
$agentInfo
[
"district_id"
];
$params
[
"level"
]
=
array
(
"in"
,
"30,40"
);
$params
[
"status"
]
=
array
(
"in"
,
"0,1,3"
);
//总监可能转勤
}
else
{
$result
[
"superintendent_name"
]
=
"施总"
;
}
if
(
!
$result
[
"superintendent_name"
])
{
$agentModel
=
new
AAgents
();
$info
=
$agentModel
->
getAgentById
(
"id,name"
,
$params
);
if
(
$info
)
{
$result
[
"superintendent_name"
]
=
$info
[
0
][
"name"
];
}
}
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"账号异常"
);
}
}
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
d9239b18
...
@@ -263,7 +263,7 @@ class AAgents extends BaseModel
...
@@ -263,7 +263,7 @@ class AAgents extends BaseModel
$result
=
$this
->
field
(
$field
)
$result
=
$this
->
field
(
$field
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
//
echo $this->getLastSql();
echo
$this
->
getLastSql
();
return
$result
;
return
$result
;
}
}
...
...
application/route.php
View file @
d9239b18
...
@@ -829,6 +829,7 @@ Route::group('broker', [
...
@@ -829,6 +829,7 @@ Route::group('broker', [
'updateBindAXB'
=>
[
'api_broker/CellPhone/updateBindAXB'
,
[
'method'
=>
'post'
]],
//更新绑定关系隐私号码
'updateBindAXB'
=>
[
'api_broker/CellPhone/updateBindAXB'
,
[
'method'
=>
'post'
]],
//更新绑定关系隐私号码
'getCallLog'
=>
[
'api_broker/broker/getCallLog'
,
[
'method'
=>
'get|post'
]],
'getCallLog'
=>
[
'api_broker/broker/getCallLog'
,
[
'method'
=>
'get|post'
]],
'editBank'
=>
[
'api_broker/broker/editBank'
,
[
'method'
=>
'post'
]],
//我的-工资卡
'editBank'
=>
[
'api_broker/broker/editBank'
,
[
'method'
=>
'post'
]],
//我的-工资卡
'getSuperintendent'
=>
[
'api_broker/broker/getSuperintendent'
,
[
'method'
=>
'post|get'
]],
'agentUserTb'
=>
[
'api_broker/Client/agentUserTb'
,
[
'method'
=>
'get'
]],
//客户列表
'agentUserTb'
=>
[
'api_broker/Client/agentUserTb'
,
[
'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