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
4b7fd8f9
Commit
4b7fd8f9
authored
Aug 06, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
# Conflicts: # application/api_broker/service/BrokerService.php
parents
2e851fa2
1bd2ad78
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
BrokerService.php
application/api_broker/service/BrokerService.php
+9
-5
Notice.php
application/index/controller/Notice.php
+1
-1
No files found.
application/api_broker/service/BrokerService.php
View file @
4b7fd8f9
...
@@ -50,11 +50,15 @@ class BrokerService
...
@@ -50,11 +50,15 @@ class BrokerService
}
}
$is_exits
=
false
;
$is_exits
=
false
;
foreach
(
$result
as
$item
)
{
foreach
(
$result
as
$item
)
{
if
(
$device_id
==
$item
[
"device_id"
])
{
//todo 1.判断ip是否相同$device_id字段,2.ip不同则判断push_id是否相同,相同更新ip,3.ip相同则判断push_id是否相同,
//当个推返回的id改变时则更新记录
if
(
$model
==
$item
[
"model"
]
&&
!
empty
(
$push_id
)
&&
if
(
!
empty
(
$push_id
)
&&
$push_id
!=
$item
[
"push_id"
])
{
((
$device_id
!=
$item
[
"device_id"
]
&&
$push_id
==
$item
[
"push_id"
])
||
$this
->
aBD
->
updateDevice
([
"id"
=>
$item
[
"id"
],
"push_id"
=>
$push_id
]);
(
$device_id
==
$item
[
"device_id"
]
&&
$push_id
!=
$item
[
"push_id"
]))
}
)
{
$this
->
aBD
->
updateDevice
([
"id"
=>
$item
[
"id"
],
"push_id"
=>
$push_id
,
"device_id"
=>
$device_id
]);
return
true
;
}
if
(
$device_id
==
$item
[
"device_id"
]
){
if
(
$item
[
"is_forbidden"
]
==
0
)
{
if
(
$item
[
"is_forbidden"
]
==
0
)
{
return
true
;
return
true
;
}
elseif
(
$item
[
"is_forbidden"
]
==
1
)
{
//已存在申请关系
}
elseif
(
$item
[
"is_forbidden"
]
==
1
)
{
//已存在申请关系
...
...
application/index/controller/Notice.php
View file @
4b7fd8f9
...
@@ -98,7 +98,7 @@ class Notice extends Basic
...
@@ -98,7 +98,7 @@ class Notice extends Basic
$service_push
=
new
PushMessageService
();
$service_push
=
new
PushMessageService
();
$url
=
'app/dist/index.html#/announcementDetails?id='
.
$this
->
m_push
->
id
;
$url
=
'app/dist/index.html#/announcementDetails?id='
.
$this
->
m_push
->
id
;
$this
->
m_push
->
editData
([
'link'
=>
CURRENT_URL
.
$url
],
$this
->
m_push
->
id
);
$this
->
m_push
->
editData
([
'link'
=>
CURRENT_URL
.
$url
],
$this
->
m_push
->
id
);
$service_push
->
pushAll
(
$data
[
'title'
],
mb_substr
(
$data
[
'content'
],
0
,
10
)
.
'...'
,
$url
);
$service_push
->
pushAll
(
$data
[
'title'
],
'点击查看公告内容'
,
$url
);
return
$this
->
response
(
200
,
'新增成功!'
);
return
$this
->
response
(
200
,
'新增成功!'
);
}
}
...
...
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