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
16516625
Commit
16516625
authored
Jul 05, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
f4a2f44d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
Broker.php
application/api_broker/controller/Broker.php
+5
-7
No files found.
application/api_broker/controller/Broker.php
View file @
16516625
...
...
@@ -21,7 +21,6 @@ use app\model\NoteLog;
use
app\model\UPhoneFollowPp
;
use
app\model\Users
;
use
think\Exception
;
use
Think\Log
;
use
think\Request
;
class
Broker
extends
Basic
...
...
@@ -200,7 +199,6 @@ class Broker extends Basic
*/
private
function
judgeBand
(
string
$device_id
,
int
$agent_id
,
string
$model
,
int
$type
,
string
$push_id
)
:
bool
{
Log
::
record
(
"push_id -----------------------"
.
$push_id
);
$params
[
"agent_id"
]
=
$agent_id
;
$result
=
$this
->
aBD
->
getDeviceByAgentId
(
$params
);
...
...
@@ -217,16 +215,16 @@ class Broker extends Basic
$is_exits
=
false
;
foreach
(
$result
as
$item
)
{
if
(
$device_id
==
$item
[
"device_id"
])
{
//当个推返回的id改变时则更新记录
if
(
!
empty
(
$push_id
)
&&
$push_id
!=
$item
[
"push_id"
]){
$this
->
aBD
->
updateDevice
([
"id"
=>
$item
[
"id"
],
"push_id"
=>
$push_id
]);
}
if
(
$item
[
"is_forbidden"
]
==
0
)
{
return
true
;
}
elseif
(
$item
[
"is_forbidden"
]
==
1
)
{
//已存在申请关系
$is_exits
=
true
;
}
//当个推返回的id改变时则更新记录
if
(
!
empty
(
$push_id
)
&&
$push_id
!=
$item
[
"push_id"
]){
Log
::
record
(
"push_id ----*************-------------------"
.
$push_id
);
$this
->
aBD
->
updateDevice
([
"id"
=>
$item
[
"id"
],
"push_id"
=>
$push_id
]);
}
}
}
if
(
!
$is_exits
&&
$type
==
0
)
...
...
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