From bda92e4e1afe33ebc2fa073a9ce4cb543764a964 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 13 Mar 2020 15:32:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=87=8D=E5=A4=8D=E6=A0=87?= =?UTF-8?q?=E8=AF=86-=E6=B3=A8=E5=86=8C=E4=BA=8B=E4=BB=B6=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Tool/TaskClient.class.php | 5 +++++ Application/Mobile/Controller/CommonController.class.php | 4 ++++ Application/Mobile/Controller/SsgController.class.php | 4 ++++ Application/Mobile/Controller/UserController.class.php | 6 ++++++ Data/update.sql | 8 +++++++- 5 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Application/Base/Tool/TaskClient.class.php b/Application/Base/Tool/TaskClient.class.php index f65f50949..c80a0c47b 100644 --- a/Application/Base/Tool/TaskClient.class.php +++ b/Application/Base/Tool/TaskClient.class.php @@ -55,4 +55,9 @@ class TaskClient { return $this->post('/message/sms-check', ['mobile' => $mobile, 'code' => $code]); } + + public function registerEvent($userId, $source) + { + return $this->post('/game-event/register', ['user_id' => $userId, 'source' => $source]); + } } \ No newline at end of file diff --git a/Application/Mobile/Controller/CommonController.class.php b/Application/Mobile/Controller/CommonController.class.php index d1b0e631a..64539939e 100644 --- a/Application/Mobile/Controller/CommonController.class.php +++ b/Application/Mobile/Controller/CommonController.class.php @@ -212,6 +212,10 @@ class CommonController extends BaseController { /* 添加用户 */ $res = M('user', 'tab_') ->add($data); + if ($res) { + $taskClient = new TaskClient(); + $taskClient->registerEvent($res, 'TestFlight'); + } return $res; } diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 8acbf792e..794378688 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -299,6 +299,10 @@ class SsgController extends BaseController { } /* 添加用户 */ $res = M('user', 'tab_') ->add($data); + if ($res) { + $taskClient = new TaskClient(); + $taskClient->registerEvent($res, 'SSG'); + } return $res; # code... } diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index afdfcdbde..bb580c557 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -414,6 +414,8 @@ class UserController extends BaseController $pid = $this->suser->register($phone, $password, $phone, $register_way, $register_type, '', '', $sex, $nickname, $head_img); } if ($pid > 0) { + $taskClient = new TaskClient(); + $taskClient->registerEvent($pid, 'WAP'); if (empty($safeinfo['promote_id'])) { $data = array( 'status' => 1, @@ -545,6 +547,10 @@ class UserController extends BaseController $pid = $this->suser->register($account, $password, '', $register_way, $register_type, '', '', $sex, $nickname, $head_img); if ($pid > 0) { + + $taskClient = new TaskClient(); + $taskClient->registerEvent($pid, 'WAP'); + $promoteId = I('post.promote_id'); $promoteId = intval($promoteId); diff --git a/Data/update.sql b/Data/update.sql index 2b4e67000..cc5e73d6a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -1451,4 +1451,10 @@ ALTER TABLE `tab_spend` ADD INDEX `game_time`(`game_id`,`pay_time`) USING BTREE; -- 为公会统计新增spend索引 chenzhi 2020/03/11 ALTER TABLE `tab_spend` -ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE; \ No newline at end of file +ADD INDEX `promote_time`(`promote_id`,`pay_time`) USING BTREE; + +-- liaojinling 用户重复标识 +ALTER TABLE `tab_user` +ADD INDEX `index_device_ip` (`device_number`, `last_login_ip`) USING BTREE ; +ALTER TABLE `tab_user` +ADD COLUMN `is_repeat` tinyint(1) not null default 0 comment '是否重复用户[设备/IP]'; \ No newline at end of file