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
768f5878
Commit
768f5878
authored
Jul 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人推送所有设备
parent
4328ceb2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
PushMessageService.php
application/api_broker/service/PushMessageService.php
+9
-8
No files found.
application/api_broker/service/PushMessageService.php
View file @
768f5878
...
...
@@ -11,6 +11,7 @@ namespace app\api_broker\service;
use
app\api\untils\GeTuiUntils
;
use
app\model\AAgents
;
use
app\model\ABindingDevice
;
use
app\model\AStore
;
use
app\model\GHouses
;
use
app\model\GHousesToAgents
;
...
...
@@ -42,7 +43,7 @@ class PushMessageService
$agent
=
new
AAgents
();
$house
=
new
GHouses
();
$data
=
$house_agent
->
getHousesAgents
(
$house_id
,
'b.id
,device_id
'
,
[
'type'
=>
$type
]);
$data
=
$house_agent
->
getHousesAgents
(
$house_id
,
'b.id'
,
[
'type'
=>
$type
]);
$agent_name
=
$agent
->
getAgentsStoreById
([
'a.id'
=>
$agent_id
],
'name,store_name'
);
$house_data
=
$house
->
getHouseDetail
(
'internal_title'
,[
'id'
=>
$house_id
]);
foreach
(
$data
as
$k
=>
$v
)
{
...
...
@@ -69,7 +70,7 @@ class PushMessageService
$report_data
=
$report
->
getReportOrder
(
$field
,
[
'a.id'
=>
$report_id
]);
$agent
=
new
AAgents
();
$agent_data
=
$agent
->
getAgentInfo
(
'id
,device_id
'
,
$report_data
[
'report_agent_id'
]);
$agent_data
=
$agent
->
getAgentInfo
(
'id'
,
$report_data
[
'report_agent_id'
]);
if
(
$type
==
1
)
{
$content
=
"客户
{
$report_data
[
'user_name'
]
}
进场【
{
$report_data
[
'house_title'
]
}
】商铺"
;
...
...
@@ -171,8 +172,8 @@ class PushMessageService
return
false
;
}
$result
=
[];
$agent
=
new
AAgents
();
$device_id
=
$agent
->
getAgentsById
(
$id
,
'device_id'
);
//
$agent = new AAgents();
//
$device_id = $agent->getAgentsById($id, 'device_id');
if
(
!
empty
(
$device_id
))
{
// $result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
...
...
@@ -196,7 +197,7 @@ class PushMessageService
$agent
=
new
AAgents
();
$order
=
new
OrderModel
();
$house
=
$order
->
getHouseInfoByOrderIdOne
(
'internal_title'
,
[
'a.id'
=>
$order_id
]);
$agent_data
=
$agent
->
getAgentInfo
(
'id,
device_id,
name'
,
$agent_id
);
$agent_data
=
$agent
->
getAgentInfo
(
'id,name'
,
$agent_id
);
$content
=
"
{
$submit_agent_name
}
新增成交报告,分佣方:
{
$agent_data
[
'name'
]
}
[
{
$house
[
'internal_title'
]
}
]商铺"
;
// return $this->push->public_push_message_for_one($agent_data['id'], $agent_data['device_id'], '新增分佣', $content);
...
...
@@ -214,11 +215,11 @@ class PushMessageService
*/
public
function
pushAgentAllDeviceId
(
$id
,
$title
,
$content
,
$type
=
null
,
$user_id
=
null
)
{
$m_agent_device
=
new
ABindingDevice
();
$device_id_array
=
$m_agent_device
->
getDeviceByAgentId
([
'agent_id'
=>
$id
],
'id,
device
_id'
);
$device_id_array
=
$m_agent_device
->
getDeviceByAgentId
([
'agent_id'
=>
$id
],
'id,
push
_id'
);
foreach
(
$device_id_array
as
$k
=>
$v
)
{
if
(
!
empty
(
$v
[
'
device
_id'
]))
{
$this
->
push
->
public_push_message_for_one
(
$id
,
$v
[
'
device
_id'
],
$title
,
$content
,
$type
,
$user_id
);
if
(
!
empty
(
$v
[
'
push
_id'
]))
{
$this
->
push
->
public_push_message_for_one
(
$id
,
$v
[
'
push
_id'
],
$title
,
$content
,
$type
,
$user_id
);
}
}
...
...
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