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
3f6a1834
Commit
3f6a1834
authored
Sep 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户冻结推送
parent
80d38385
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
PushMessageService.php
application/api_broker/service/PushMessageService.php
+6
-4
No files found.
application/api_broker/service/PushMessageService.php
View file @
3f6a1834
...
...
@@ -216,16 +216,17 @@ class PushMessageService
* @param $content
* @param null $type
* @param null $user_id
* @param int $is_forbidden
* @return array|bool
*/
public
function
pushAgentAllDeviceId
(
$id
,
$title
,
$content
,
$type
=
null
,
$user_id
=
null
)
public
function
pushAgentAllDeviceId
(
$id
,
$title
,
$content
,
$type
=
null
,
$user_id
=
null
,
$is_forbidden
=
0
)
{
if
(
empty
(
$id
))
{
return
false
;
}
$m_agent_device
=
new
ABindingDevice
();
$device_id_array
=
$m_agent_device
->
getDeviceByAgentId
([
'agent_id'
=>
$id
,
'is_forbidden'
=>
0
],
'id,push_id'
);
$device_id_array
=
$m_agent_device
->
getDeviceByAgentId
([
'agent_id'
=>
$id
,
'is_forbidden'
=>
$is_forbidden
,
'is_pc'
=>
0
],
'id,push_id'
);
$result
=
[];
if
(
!
empty
(
$device_id_array
))
{
foreach
(
$device_id_array
as
$k
=>
$v
)
{
...
...
@@ -288,7 +289,7 @@ class PushMessageService
$title
=
$type
=
''
;
$m_push
=
new
MPushMessage
();
$field
=
'id,addressee_id,type,message,house_id,user_id'
;
$where
[
'status'
]
=
$id
=
0
;
$where
[
'status'
]
=
$id
=
$is_forbidden
=
0
;
$push_data
=
$m_push
->
getDateLimit
(
$field
,
$where
,
100
);
foreach
(
$push_data
[
'data'
]
as
$k
=>
$v
)
{
...
...
@@ -316,9 +317,10 @@ class PushMessageService
$title
=
'账号冻结'
;
$id
=
$v
[
'addressee_id'
];
$type
=
'down_line'
;
$is_forbidden
=
1
;
}
$result
=
$this
->
pushAgentAllDeviceId
(
$v
[
'addressee_id'
],
$title
,
$v
[
'message'
],
$type
,
$id
);
$result
=
$this
->
pushAgentAllDeviceId
(
$v
[
'addressee_id'
],
$title
,
$v
[
'message'
],
$type
,
$id
,
$is_forbidden
);
$update_data
[
'status'
]
=
1
;
$update_data
[
'send_time'
]
=
date
(
'Y-m-d H:i:s'
);
...
...
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