Commit f425912a authored by hujun's avatar hujun

bug 进场推送增加判断

parent fb2a1f49
......@@ -221,12 +221,18 @@ class PushMessageService
*/
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{
if (empty($id)) {
return false;
}
$m_agent_device = new ABindingDevice();
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id ], 'id,push_id');
foreach ($device_id_array as $k => $v) {
if (!empty($v['push_id'])) {
$this->push->public_push_message_for_one($id, $v['push_id'], $title, $content, $type, $user_id);
if (!empty($device_id_array)) {
foreach ($device_id_array as $k => $v) {
if (!empty($v['push_id'])) {
$this->push->public_push_message_for_one($id, $v['push_id'], $title, $content, $type, $user_id);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment