diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index 5ebaa6eee..9420e7c42 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -482,7 +482,7 @@ class AuthManagerController extends AdminController{ if ($AuthGroup->where("id = {$gid}")->save(array('data_empower_type'=>$data_empower_type,'data_president'=>$promoteData))) { $this->success('操作成功',U('AuthManager/index')); } else { - $this->error('操作失败,请改变成员'); + $this->success('操作成功',U('AuthManager/index')); } } diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index b708385e0..93782c10b 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2687,7 +2687,7 @@ class ExportController extends Controller $map['tp1.chain'] = '/'; } //为数据权限添加 - setPowerPromoteIds($map); + setPowerPromoteIds($map, 'u.promote_id'); $data = M('promote', 'tab_')->alias('tp1')->field('tp1.account as promote_account,tp1.id, date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(u.id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, @@ -2706,7 +2706,8 @@ class ExportController extends Controller $user_auth_promote_ids = session('user_auth_promote_ids'); if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { //官方渠道数据添加 - $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, + $authorityData = M('user', 'tab_')->alias('u') + ->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 47754f345..260683adb 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -83,10 +83,16 @@ class MemberController extends ThinkController //1.2 与游戏相关 $game_map = false; if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) { + $game_map = " and tab_user_play_info.game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")"; } if (isset($_REQUEST['server_name'])) { - $game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; + if($game_map){ + $game_map .= " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; + }else{ + $game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; + } + } $promoteRoot = getPowerPromoteIds(); diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index e24602a2e..0ccf54ea5 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -392,7 +392,7 @@ class PlatformController extends ThinkController } //为数据权限添加 - setPowerPromoteIds($map); + setPowerPromoteIds($map, 'u.promote_id'); $data = M('promote', 'tab_')->alias('tp1') ->field('tp1.account as promote_account,tp1.id, @@ -403,7 +403,7 @@ class PlatformController extends ThinkController count(IF(register_time ' . $mounth . ',1,null)) as mounth') ->join("tab_promote AS tp2 ON tp2.`chain` LIKE CONCAT('%/', tp1.id, '/%') OR tp2.id = tp1.id", 'left') ->join("tab_user as u on tp2.id = u.promote_id", 'left') -// ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) + ->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false) ->where($map) ->group('tp1.id') ->order('count desc, register_time') @@ -417,7 +417,8 @@ class PlatformController extends ThinkController $user_auth_promote_ids = session('user_auth_promote_ids'); if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) { //官方渠道数据添加 - $authorityData = M('user', 'tab_')->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, + $authorityData = M('user', 'tab_')->alias('u') + ->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time, count(id) as count, count(IF(register_time ' . $today . ',1,null)) as today, count(IF(register_time ' . $week . ',1,null)) as week, diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 66d201d42..6c9946b7b 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -7,6 +7,7 @@ class RechargeSumController extends ThinkController public function summation($p = 1) { + $startDateTime = empty($_REQUEST['timeStart']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['timeStart']; $endDateTime = empty($_REQUEST['timeEnd']) ? date('Y-m-d') : $_REQUEST['timeEnd']; $startTime = strtotime($startDateTime); @@ -56,7 +57,6 @@ class RechargeSumController extends ThinkController if (!empty($_REQUEST['server_id'])) { $rmap['tab_user_play.server_id'] = $map['server_id'] = $_REQUEST['server_id']; } - if ($_REQUEST['bindcoin'] == 1) { $map['pay_way'] = array('egt', 0); } diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index ce39a6797..ec448a0ce 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -37,7 +37,7 @@

玩家列表

-

说明:本站用户即手机和账号注册用户,第三方用户即通过微信、百度、QQ、新浪等方式登录用户。

+

说明:此列表数据以平台账号为统计基数

说明:游客登录,默认属于第三方用户;当用户通过SDK设置了用户名以后,记录变换到本站用户列表里,账户自动更换为设置的账号!

diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index 4ddcb924f..78e9e9ea8 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -33,7 +33,7 @@ 推广员充值统计

推广员注册统计

-

说明:针对所有推广员下的注册用户,进行注册排行统计

+

说明:此列表数据以点击推广链接下载游戏注册数量为统计基数

diff --git a/Application/Admin/View/RechargeSum/summation.html b/Application/Admin/View/RechargeSum/summation.html index 37a19f460..c01990b4a 100644 --- a/Application/Admin/View/RechargeSum/summation.html +++ b/Application/Admin/View/RechargeSum/summation.html @@ -81,7 +81,7 @@
-
@@ -321,7 +321,7 @@ }); $("#promote_level").change(); - var game_server = "{:I('server_name')}"; + var server_id = "{:I('server_id')}"; $("#game_type").change(function(){ $.ajax({ url:"{:U('Ajax/getGmeServer')}", @@ -331,11 +331,11 @@ success:function(data){ str = ""; for (var i in data){ - str += "" + str += "" } - $("#server_name").empty(); - $("#server_name").append(str); - $("#server_name").select2(); + $("#server_id").empty(); + $("#server_id").append(str); + $("#server_id").select2(); } }) }); diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index 676987c05..d94296fd7 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -43,7 +43,7 @@ diff --git a/Application/User/Model/UcenterMemberModel.class.php b/Application/User/Model/UcenterMemberModel.class.php index f1b9cb64e..70953fe13 100644 --- a/Application/User/Model/UcenterMemberModel.class.php +++ b/Application/User/Model/UcenterMemberModel.class.php @@ -118,6 +118,8 @@ class UcenterMemberModel extends Model{ if($data = $this->create($data)){ $data['username'] = $username; $data['email'] = $email; + $data['password'] = think_ucenter_md5($password, UC_AUTH_KEY); + $data['second_pwd'] = think_ucenter_md5($second_pwd, UC_AUTH_KEY); try { $status = M('UcenterMember', 'sys_')->add($data); } catch (\Throwable $th) { diff --git a/Data/update.sql b/Data/update.sql index e78281dd0..1dca7f650 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -818,14 +818,9 @@ ALTER TABLE `platform`.`sys_auth_group` ADD COLUMN `data_president` longtext NULL COMMENT '会长数据' AFTER `data_empower_type`; -- user_play 增加create_time -ALTER TABLE `platform_pre1218`.`tab_user_play` +ALTER TABLE `platform_pre1218`.`tab_user_play` ADD COLUMN `create_time` int(11) NOT NULL COMMENT '创建时间' AFTER `check_money`; --- 菜单(推广公司录入) liuweiwen -INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) -VALUES ('推广公司录入', 185, 56, 'PromoteCompany/lists', 0, '该功能用于录入工会所属的推广公司名称', '推广员管理', 0, 1); - - -- 推广员表加入推广公司字段 liuweiwen 20191216 ALTER TABLE tab_promote ADD `company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司ID'; -- 新增推广公司表 liuweiwen 20191216 @@ -838,3 +833,34 @@ CREATE TABLE `tab_promote_company` ( `last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='推广公司'; +-- 推广员表新增推广公司id liuweiwen 2019-12-23 +ALTER TABLE tab_promote ADD `company_id` int(11) NOT NULL DEFAULT '0' COMMENT '推广公司ID'; +-- 新增推广公司表 liuweiwen 2019-12-23 +CREATE TABLE `tab_promote_company` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', + `company_name` varchar(60) NOT NULL COMMENT '推广公司名称', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '添加人ID', + `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0-禁用 1-启用', + `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间', + `last_up_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='推广公司'; + + +-- 菜单(推广公司录入)有个变量,所以后面几句要一起执行 liuweiwen +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('推广公司录入', 185, 56, 'PromoteCompany/lists', 0, '该功能用于录入工会所属的推广公司名称', '推广员管理', 0, 1); + +set @company_id = (SELECT id FROM sys_menu WHERE title = '推广公司录入'); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('新增', @company_id, 0, 'PromoteCompany/add', 0, '', '推广员管理', 0, 1); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('编辑', @company_id, 0, 'PromoteCompany/edit', 0, '', '推广员管理', 0, 1); +INSERT INTO `sys_menu`(`title`, `pid`, `sort`, `url`, `hide`, `tip`, `group`, `is_dev`, `status`) +VALUES ('删除', @company_id, 0, 'PromoteCompany/del', 0, '', '推广员管理', 0, 1); +-- 增加修改b_spend表索引 liuweiwen 2019-12-23 +DROP INDEX o ON tab_spend; +ALTER TABLE tab_spend ADD INDEX o(pay_status, is_check, settle_check, promote_id); +ALTER TABLE tab_user_login_record ADD INDEX user_id_promote_idx(user_id, promote_id); + +