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
42dac23f
Commit
42dac23f
authored
Nov 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录处理单个账号
parent
8591ec67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
Broker.php
application/api_broker/controller/Broker.php
+13
-0
ABindingDevice.php
application/model/ABindingDevice.php
+3
-1
No files found.
application/api_broker/controller/Broker.php
View file @
42dac23f
...
...
@@ -189,6 +189,19 @@ class Broker extends Basic
$redis_
->
set
(
"agent_city_"
.
$agents_data
[
'id'
],
$site_city
[
0
][
'city'
]);
$redis_
->
set
(
"agent_site_id_"
.
$agents_data
[
'id'
],
$agents_data
[
'site_id'
]);
/*处理多个手机登录*/
$m_bind
=
new
ABindingDevice
();
$bind_where
[
'push_id'
]
=
$params
[
"push_id"
];
$bind_where
[
'device_id'
]
=
$params
[
"device_id"
];
$bind_where
[
'agent_id'
]
=
[
'<>'
,
$agents_data_list
[
'id'
]];
$del_bind_id
=
$m_bind
->
getDeviceByAgentId
(
$bind_where
,
'id,device_id,push_id'
);
if
(
count
(
$del_bind_id
)
>
0
)
{
foreach
(
$del_bind_id
as
$v
)
{
$m_bind
->
updateDevice
([
'id'
=>
$v
[
'id'
],
'is_forbidden'
=>
1
]);
}
}
/*处理多个手机登录*/
return
$this
->
response
(
200
,
$data
[
'msg'
],
$data
[
'data'
]);
}
...
...
application/model/ABindingDevice.php
View file @
42dac23f
...
...
@@ -80,7 +80,9 @@ class ABindingDevice extends BaseModel
if
(
isset
(
$params
[
"is_pc"
]))
{
$where_
[
"is_pc"
]
=
$params
[
"is_pc"
];
}
if
(
isset
(
$params
[
"push_id"
]))
{
$where_
[
"push_id"
]
=
$params
[
"push_id"
];
}
try
{
$data
=
$this
->
field
(
$field
)
...
...
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