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
3abddda7
Commit
3abddda7
authored
Jul 03, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updatePhone
parent
d5a3f1ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
Broker.php
application/index/controller/Broker.php
+19
-0
BrokerService.php
application/index/service/BrokerService.php
+26
-1
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Broker.php
View file @
3abddda7
...
...
@@ -1147,4 +1147,22 @@ class Broker extends Basic
return
$this
->
response
(
$result
[
'status'
],
$result
[
'msg'
],
[]);
}
/**
* 处理经纪人状态
*
* @return \think\Response
*/
public
function
updatePhone
()
{
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
""
;
$broker_service
=
new
BrokerService
();
$data
=
$broker_service
->
updatePhone
(
$this
->
params
);
if
(
$data
[
'status'
]
==
'fail'
)
{
$result
[
'code'
]
=
101
;
$result
[
'msg'
]
=
$data
[
'msg'
];
}
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
]);
}
}
\ No newline at end of file
application/index/service/BrokerService.php
View file @
3abddda7
...
...
@@ -243,6 +243,7 @@ class BrokerService
*/
public
function
updateStatus
(
array
$data
,
int
$operation_id
)
{
$result
[
'status'
]
=
'successful'
;
$save_data
[
'status'
]
=
$data
[
'status'
];
$save_data
[
'id'
]
=
$data
[
'id'
];
$id
=
$this
->
m_agent
->
saveAgent
(
$save_data
);
...
...
@@ -285,7 +286,7 @@ class BrokerService
$redis
=
new
RedisCacheService
();
$redis
->
agentCache
(
$id
);
return
;
return
$result
;
}
/**
...
...
@@ -524,4 +525,27 @@ class BrokerService
return
array
(
'status'
=>
200
,
'msg'
=>
'修改成功'
,
'result'
=>
''
);
}
/**
* 处理经纪人状态
*
* @param array $data
* @param int $operation_id
* @return mixed
*/
public
function
updatePhone
(
array
$data
)
{
$result
[
'status'
]
=
'successful'
;
if
(
empty
(
$data
[
'id'
])
||
empty
(
$data
[
'phone'
]))
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
'参数错误'
;
return
$result
;
}
$save_data
[
'phone'
]
=
$data
[
'phone'
];
$save_data
[
'id'
]
=
$data
[
'id'
];
$id
=
$this
->
m_agent
->
saveAgent
(
$save_data
);
$redis
=
new
RedisCacheService
();
$redis
->
agentCache
(
$id
);
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
3abddda7
...
...
@@ -168,6 +168,7 @@ Route::group('index', [
'saveAgentIndex'
=>
[
'index/broker/saveAgentIndex'
,
[
'method'
=>
'get'
]],
//编辑列表列表界面
'AgentList'
=>
[
'index/broker/AgentList'
,
[
'method'
=>
'get'
]],
//首页列表【接口】
'saveAgent'
=>
[
'index/broker/saveAgentV2'
,
[
'method'
=>
'get|post'
]],
//修改经纪人【接口】
'updatePhone'
=>
[
'index/broker/updatePhone'
,
[
'method'
=>
'post|get'
]],
//修改手机号
'updateStatus'
=>
[
'index/broker/updateStatusV2'
,
[
'method'
=>
'post'
]],
//状态修改【接口】
'updatePosition'
=>
[
'index/broker/updatePosition'
,
[
'method'
=>
'post'
]],
//职称【接口】
'updateRole'
=>
[
'index/broker/updateRole'
,
[
'method'
=>
'post'
]],
//经纪人角色修改【接口】
...
...
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