Commit 96b24c88 authored by hujun's avatar hujun

个推推送增加是否被禁用判断

parent 7e663691
......@@ -222,12 +222,14 @@ class PushMessageService
/**
* @param $id
* @param $device_id
* @param $title
* @param $content
* @param null $type
* @param null $user_id
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function pushAgentAllDeviceId($id, $title, $content, $type = null, $user_id = null)
{
......@@ -236,7 +238,7 @@ class PushMessageService
}
$m_agent_device = new ABindingDevice();
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id ], 'id,push_id');
$device_id_array = $m_agent_device->getDeviceByAgentId([ 'agent_id' => $id, 'is_forbidden'=>0], 'id,push_id');
if (!empty($device_id_array)) {
foreach ($device_id_array as $k => $v) {
......
......@@ -58,12 +58,15 @@ class ABindingDevice extends BaseModel
}
}
/**
* 根据经纪人id获取绑定过的设备id
*
* @param array $params
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getDeviceByAgentId(array $params, string $field = "id,agent_id,device_id,is_forbidden,model,push_id,is_pc")
{
......
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