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
f19c7aad
Commit
f19c7aad
authored
Jul 16, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全局推送处理
parent
f85bd85f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
PushMessageService.php
application/api_broker/service/PushMessageService.php
+22
-0
No files found.
application/api_broker/service/PushMessageService.php
View file @
f19c7aad
...
...
@@ -99,12 +99,17 @@ class PushMessageService
* 成交报告推送(feed流喜报)
*
* @param int $report_id
* @return bool|void
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
pushBargainMessage
(
$report_id
=
0
)
{
if
(
!
$this
->
pushAllow
())
{
return
false
;
}
$report
=
new
OReportModel
();
$feed
=
new
PushFeed
();
$agent
=
new
AAgents
();
...
...
@@ -153,9 +158,14 @@ class PushMessageService
* @param string $title
* @param string $content
* @param string $url
* @return bool|void
*/
public
function
pushAll
(
string
$title
=
''
,
string
$content
=
''
,
string
$url
=
''
)
{
if
(
!
$this
->
pushAllow
())
{
return
false
;
}
$url
=
$this
->
push
->
http_host
()
.
'/'
.
$url
;
$this
->
push
->
push_message_for_all
(
$title
,
$content
,
$url
);
return
;
...
...
@@ -238,4 +248,15 @@ class PushMessageService
return
true
;
}
/**
* @return bool
*/
public
function
pushAllow
()
{
$url
=
$this
->
push
->
http_host
();
if
(
$url
==
'http://api.tonglianjituan.com'
||
$url
==
'https://api.tonglianjituan.com'
)
{
return
true
;
}
return
false
;
}
}
\ No newline at end of file
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