From d4c77274265fa9c70ae51a0d578e1557a9c9845f Mon Sep 17 00:00:00 2001
From: jbrazz <2436953959@qq.com>
Date: Wed, 30 Oct 2019 14:26:56 +0800
Subject: [PATCH] upt
---
.../Controller/MemberController.class.php | 56 ++++-
.../RechargeSumController.class.php | 2 +-
.../Admin/View/Member/device_bans_edit.html | 36 +++
.../Admin/View/Member/device_bans_list.html | 221 ++++++++++++++++++
.../Admin/View/Member/login_record.html | 46 +++-
.../Admin/View/RechargeSum/summation.html | 44 +++-
6 files changed, 386 insertions(+), 19 deletions(-)
create mode 100644 Application/Admin/View/Member/device_bans_edit.html
create mode 100644 Application/Admin/View/Member/device_bans_list.html
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index 9c0d4c44a..f2d69f4d1 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -111,11 +111,11 @@ class MemberController extends ThinkController
$game_map = "";
if (isset($_REQUEST['game_type'])) {
- $game_map .= " and tab_user_play_info.sdk_version = {$_REQUEST['game_type']}";
+ $game_map .= " and tab_user_play.sdk_version = {$_REQUEST['game_type']}";
}
if (isset($_REQUEST['game_name'])) {
- $game_map .= " and tab_user_play_info.game_name like '{$_REQUEST['game_name']}%'";
+ $game_map .= " and tab_user_play.game_name like '{$_REQUEST['game_name']}%'";
}
if (isset($_REQUEST['viplevel'])) {
@@ -172,7 +172,7 @@ class MemberController extends ThinkController
$data = $usermodel->table('('.$sql1.') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,(a.deposit_total+IFNULL(sum(ss.pay_amount),0)) as recharge_total,check_status')
->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1')
- ->join($game_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_map" : false)
+ ->join($game_map ? "tab_user_play on tab_user_play.user_id = a.id $game_map" : false)
->page($page, $row)
->having($havs)
->group('a.id')
@@ -185,7 +185,7 @@ class MemberController extends ThinkController
$sql = M('user', 'tab_')->field('tab_user.id,(IFNULL(sum(b.pay_amount),0) + IFNULL(sum(ss.pay_amount),0)) AS recharge_total')
->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1')
->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1')
- ->join($game_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_map" : false)
+ ->join($game_map ? "tab_user_play on tab_user_play.user_id = tab_user.id $game_map" : false)
->where($map)
->group('tab_user.id')
->where($hav)
@@ -659,9 +659,13 @@ class MemberController extends ThinkController
public function login_record($p = 1)
{
if (isset($_REQUEST['game_name'])) {
- $extend['game_name'] = $_REQUEST['game_name'];
+ $map['game_name'] = ['like', $_REQUEST['game_name']."%"];
unset($_REQUEST['game_name']);
}
+ if (isset($_REQUEST['game_type'])) {
+ $map['sdk_version'] = $_REQUEST['game_type'];
+ unset($_REQUEST['game_type']);
+ }
if (isset($_REQUEST['login_ip'])) {
$map['login_ip'] = $_REQUEST['login_ip'];
unset($_REQUEST['login_ip']);
@@ -1101,4 +1105,46 @@ class MemberController extends ThinkController
}
}
+ public function device_bans_list($row=10, $type='', $tag='', $p=1)
+ {
+ $map = [];
+ if (!empty($type)) {
+ $map['type'] = $type;
+ }
+ if (!empty($tag)) {
+ $map['tag'] = $tag;
+ }
+ $list = M('device_bans', 'tab_')->where($map)->page($p, $row)->select();
+ $count = M('device_bans', 'tab_')->where($map)->count();
+ $page = set_pagination($count,$row);
+ if($page) {$this->assign('_page', $page);}
+ $this->assign('list_data', $list);
+ $this->display();
+ }
+
+ public function save_device_bans($id='', $type='', $tag='')
+ {
+ if (empty($id)) {
+ if (IS_GET) {
+ return $this->display('device_bans_edit');
+ } else {
+ $map = [];
+ if (empty($type) || empty($tag)) {
+ return $this->error("请填写完整信息");
+ }
+ $map['type'] = $type;
+ $map['tag'] = $tag;
+ $item = M('device_bans', 'tab_')->where($map)->find();
+ if ($item) {
+ return $this->error("该禁用已经存在(ID:{$item['id']})");
+ }
+ M('device_bans', 'tab_')->add(['type'=>$type, 'tag'=>$tag, 'create_time'=>time(), 'operator_id'=>is_login()]);
+ }
+
+ return $this->success("新增成功");
+ } else {
+ M('device_bans', 'tab_')->where(['id'=>$id])->delete();
+ return $this->success("解除成功");
+ }
+ }
}
\ No newline at end of file
diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php
index 8bd895682..c631de761 100644
--- a/Application/Admin/Controller/RechargeSumController.class.php
+++ b/Application/Admin/Controller/RechargeSumController.class.php
@@ -68,7 +68,7 @@ class RechargeSumController extends ThinkController{
}
//当天注册人数
- $registerNum = D('User')->where(array_merge($rmap,array('puid'=>0)))->getField("id",true);
+ $registerNum = D('User')->where(array_merge($rmap,array('puid'=>0)))->join("tab_user_play on tab_user.id = tab_user_play.user_id")->getField("tab_user.id",true);
//当天活跃人数
$livenNum = D('UserPlay')->where($map)->count("id");
diff --git a/Application/Admin/View/Member/device_bans_edit.html b/Application/Admin/View/Member/device_bans_edit.html
new file mode 100644
index 000000000..fcb6e2572
--- /dev/null
+++ b/Application/Admin/View/Member/device_bans_edit.html
@@ -0,0 +1,36 @@
+ 说明:此处显示设备、IP等风控记录风控管理
+
+
+
+
+
+
+
+
+
+
+ ID
+ 类型
+ 标识
+ 操作人
+ 操作时间
+ 操作
+ aOh! 暂时还没有内容!
+
+
+
+ {$data.id}
+
+ {$data.tag}
+ {:get_admin_nickname($data['operator_id'])}
+ {$data.create_time|date='Y-m-d H:i:s',###}
+
+ 解除
+
+