Commit 8292a9a8 authored by clone's avatar clone

Merge branch 'wx0604' of https://gitee.com/zwyjjc/tl_estate into wx0604

parents e58ff790 4624d246
......@@ -3,6 +3,7 @@
namespace app\api\service;
use app\api\untils\JwtUntils;
use app\api_broker\service\PushMessageService;
use app\model\Users;
use app\model\UWxInfo;
......@@ -141,8 +142,13 @@ class RegisterService
$userParams["id"] = $id;
} else {
$userParams["registration_time"] = date("Y-m-d H:i:s", time());
if ($referrer_id == 0)
if ($referrer_id == 0) {
$userParams["first_login_time"] = date("Y-m-d H:i:s", time()); //记录第一次登录时间排除邀请注册
$push = new PushMessageService();
$content = '你邀请的客户'.$user_nick.'-'.$phone.'手机号成功下载登录App';
$push->pushMessageById($referrer_id,'邀请注册', $content);
}
}
$userParams["buyer_id"] = $buyer_id;
$userParams["user_phone"] = $phone;
......
......@@ -166,10 +166,13 @@ class PushMessageService
if (empty($id)) {
return false;
}
$result = [];
$agent = new AAgents();
$device_id = $agent->getAgentsById($id, 'device_id');
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
if (!empty($device_id)) {
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
}
return $result;
}
......
This diff is collapsed.
This diff is collapsed.
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