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
8fdeea78
Commit
8fdeea78
authored
Nov 12, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1109-v2.9.8' of
https://gitee.com/zwyjjc/tl_estate
into 1109-v2.9.8
parents
d5c61163
82da6561
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
Broker.php
application/index/controller/Broker.php
+36
-0
AAgents.php
application/model/AAgents.php
+5
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Broker.php
View file @
8fdeea78
...
...
@@ -713,4 +713,39 @@ class Broker extends Basic
return
$this
->
response
(
200
,
''
,
$data
[
'data'
]);
}
/**
* 修改经纪人职称
*
* @return \think\Response
*/
public
function
updatePosition
()
{
if
(
empty
(
$this
->
params
[
'agent_id'
])
||
empty
(
$this
->
params
[
'position'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
try
{
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
getAgentInfo
(
'id,position'
,
$this
->
params
[
'agent_id'
]);
if
(
empty
(
$agent_data
))
{
return
$this
->
response
(
101
,
'没有该经纪人'
);
}
if
(
$agent_data
[
'position'
]
==
$this
->
params
[
'position'
])
{
return
$this
->
response
(
101
,
'信息重复'
);
}
$num
=
$m_agent
->
editData
([
'position'
=>
(
int
)
$this
->
params
[
'position'
]],
$this
->
params
[
'agent_id'
]);
if
(
$num
>
0
)
{
return
$this
->
response
(
200
,
''
);
}
else
{
return
$this
->
response
(
101
,
'修改失败'
);
}
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
101
,
'内部错误:'
.
$e
->
getMessage
());
}
}
}
\ No newline at end of file
application/model/AAgents.php
View file @
8fdeea78
...
...
@@ -1399,6 +1399,11 @@ class AAgents extends BaseModel
$save_data
[
'site_id'
]
=
$params
[
'site_id'
];
}
//职称 1店长 2经理 3主任 4顾问 0新人
if
(
!
empty
(
$params
[
'position'
]))
{
$save_data
[
'position'
]
=
$params
[
'position'
];
}
if
(
empty
(
$params
[
'id'
]))
{
$save_data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
$save_data
[
'auth_group_id'
]
=
5
;
...
...
application/route.php
View file @
8fdeea78
...
...
@@ -151,6 +151,7 @@ Route::group('index', [
'AgentList'
=>
[
'index/broker/AgentList'
,
[
'method'
=>
'get'
]],
//首页列表【接口】
'saveAgent'
=>
[
'index/broker/saveAgentV2'
,
[
'method'
=>
'get|post'
]],
//修改经纪人【接口】
'updateStatus'
=>
[
'index/broker/updateStatusV2'
,
[
'method'
=>
'post'
]],
//状态修改【接口】
'updatePosition'
=>
[
'index/broker/updatePosition'
,
[
'method'
=>
'post'
]],
//职称【接口】
'updateRole'
=>
[
'index/broker/updateRole'
,
[
'method'
=>
'post'
]],
//经纪人角色修改【接口】
'deviceList'
=>
[
'index/broker/deviceList'
,
[
'method'
=>
'post|get'
]],
//经纪人设备id绑定列表
'updateDevice'
=>
[
'index/broker/updateDevice'
,
[
'method'
=>
'post|get'
]],
//解绑或绑定经纪人设备id
...
...
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