Commit 16516625 authored by clone's avatar clone

bug

parent f4a2f44d
...@@ -21,7 +21,6 @@ use app\model\NoteLog; ...@@ -21,7 +21,6 @@ use app\model\NoteLog;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
use app\model\Users; use app\model\Users;
use think\Exception; use think\Exception;
use Think\Log;
use think\Request; use think\Request;
class Broker extends Basic class Broker extends Basic
...@@ -200,7 +199,6 @@ class Broker extends Basic ...@@ -200,7 +199,6 @@ class Broker extends Basic
*/ */
private function judgeBand(string $device_id, int $agent_id, string $model, int $type, string $push_id): bool private function judgeBand(string $device_id, int $agent_id, string $model, int $type, string $push_id): bool
{ {
Log::record("push_id -----------------------".$push_id);
$params["agent_id"] = $agent_id; $params["agent_id"] = $agent_id;
$result = $this->aBD->getDeviceByAgentId($params); $result = $this->aBD->getDeviceByAgentId($params);
...@@ -217,16 +215,16 @@ class Broker extends Basic ...@@ -217,16 +215,16 @@ class Broker extends Basic
$is_exits = false; $is_exits = false;
foreach ($result as $item) { foreach ($result as $item) {
if ($device_id == $item["device_id"]) { if ($device_id == $item["device_id"]) {
//当个推返回的id改变时则更新记录
if (!empty($push_id) && $push_id != $item["push_id"]){
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id ]);
}
if ($item["is_forbidden"] == 0) { if ($item["is_forbidden"] == 0) {
return true; return true;
} elseif ($item["is_forbidden"] == 1) { //已存在申请关系 } elseif ($item["is_forbidden"] == 1) { //已存在申请关系
$is_exits = true; $is_exits = true;
} }
//当个推返回的id改变时则更新记录
if (!empty($push_id) && $push_id != $item["push_id"]){
Log::record("push_id ----*************-------------------".$push_id);
$this->aBD->updateDevice([ "id" => $item["id"], "push_id" => $push_id ]);
}
} }
} }
if (!$is_exits && $type == 0) if (!$is_exits && $type == 0)
......
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