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
56e3a0d8
Commit
56e3a0d8
authored
Jul 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人推送所有设备
parent
1fef593f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
5 deletions
+35
-5
PushMessageService.php
application/api_broker/service/PushMessageService.php
+35
-5
No files found.
application/api_broker/service/PushMessageService.php
View file @
56e3a0d8
...
@@ -47,7 +47,8 @@ class PushMessageService
...
@@ -47,7 +47,8 @@ class PushMessageService
$house_data
=
$house
->
getHouseDetail
(
'internal_title'
,[
'id'
=>
$house_id
]);
$house_data
=
$house
->
getHouseDetail
(
'internal_title'
,[
'id'
=>
$house_id
]);
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$content
=
"【
{
$agent_name
[
'store_name'
]
}
】店【
{
$agent_name
[
'name'
]
}
】约带看【
{
$house_data
[
'internal_title'
]
}
】商铺"
;
$content
=
"【
{
$agent_name
[
'store_name'
]
}
】店【
{
$agent_name
[
'name'
]
}
】约带看【
{
$house_data
[
'internal_title'
]
}
】商铺"
;
$this
->
push
->
public_push_message_for_one
(
$v
[
'id'
],
$v
[
'device_id'
],
'报备'
,
$content
);
// $this->push->public_push_message_for_one($v['id'], $v['device_id'], '报备', $content);
$this
->
pushAgentAllDeviceId
(
$v
[
'id'
],
'报备'
,
$content
);
}
}
return
;
return
;
}
}
...
@@ -82,8 +83,11 @@ class PushMessageService
...
@@ -82,8 +83,11 @@ class PushMessageService
$where
[
'level'
]
=
20
;
$where
[
'level'
]
=
20
;
$agent_store
=
$agent
->
getAgentInfo
(
'id,device_id'
,
''
,
$where
);
$agent_store
=
$agent
->
getAgentInfo
(
'id,device_id'
,
''
,
$where
);
$this
->
push
->
public_push_message_for_one
(
$report_data
[
'report_agent_id'
],
$agent_data
[
'device_id'
],
$title
,
$content
);
// $this->push->public_push_message_for_one($report_data['report_agent_id'], $agent_data['device_id'], $title, $content);
$this
->
push
->
public_push_message_for_one
(
$agent_store
[
'id'
],
$agent_store
[
'device_id'
],
$title
,
$content
);
// $this->push->public_push_message_for_one($agent_store['id'], $agent_store['device_id'], $title, $content);
$this
->
pushAgentAllDeviceId
(
$report_data
[
'report_agent_id'
],
$title
,
$content
);
$this
->
pushAgentAllDeviceId
(
$agent_store
[
'id'
],
$title
,
$content
);
return
;
return
;
}
}
...
@@ -171,7 +175,8 @@ class PushMessageService
...
@@ -171,7 +175,8 @@ class PushMessageService
$device_id
=
$agent
->
getAgentsById
(
$id
,
'device_id'
);
$device_id
=
$agent
->
getAgentsById
(
$id
,
'device_id'
);
if
(
!
empty
(
$device_id
))
{
if
(
!
empty
(
$device_id
))
{
$result
=
$this
->
push
->
public_push_message_for_one
(
$id
,
$device_id
,
$title
,
$content
,
$type
,
$user_id
);
// $result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
$result
=
$this
->
pushAgentAllDeviceId
(
$id
,
$title
,
$content
,
$type
,
$user_id
);
}
}
return
$result
;
return
$result
;
}
}
...
@@ -193,6 +198,30 @@ class PushMessageService
...
@@ -193,6 +198,30 @@ class PushMessageService
$house
=
$order
->
getHouseInfoByOrderIdOne
(
'internal_title'
,
[
'a.id'
=>
$order_id
]);
$house
=
$order
->
getHouseInfoByOrderIdOne
(
'internal_title'
,
[
'a.id'
=>
$order_id
]);
$agent_data
=
$agent
->
getAgentInfo
(
'id,device_id,name'
,
$agent_id
);
$agent_data
=
$agent
->
getAgentInfo
(
'id,device_id,name'
,
$agent_id
);
$content
=
"
{
$submit_agent_name
}
新增成交报告,分佣方:
{
$agent_data
[
'name'
]
}
[
{
$house
[
'internal_title'
]
}
]商铺"
;
$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
);
// return $this->push->public_push_message_for_one($agent_data['id'], $agent_data['device_id'], '新增分佣', $content);
return
$this
->
pushAgentAllDeviceId
(
$agent_data
[
'id'
],
'新增分佣'
,
$content
);
}
/**
* @param $id
* @param $device_id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
*/
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'
);
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
);
}
}
return
true
;
}
}
}
}
\ 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