From 8fa2a6cef37775034af3444163fa6c6c248b4f22 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 10:24:21 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index a5aaf12bb..63e44c57b 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1859,7 +1859,7 @@ class QueryController extends BaseController ->field($field) ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id') ->where($map) - ->group('uc.role_id,uc.game_id,uc.user_id,uc.id') + ->group('uc.role_id,uc.game_id,uc.user_id') ->buildSql(); $query = M()->alias('record') ->table($subQuery) @@ -1870,7 +1870,7 @@ class QueryController extends BaseController $totalQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id') - ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id,uc.id') + ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id') ->where($map) ->buildSql(); $total = M()->alias('totals') From 0679e5709b4d549339951452df98bc19fc843e64 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 10:27:33 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 42 ++++--------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index d40432f1c..63e44c57b 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1678,16 +1678,8 @@ class QueryController extends BaseController } if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - $gameId = $gameId ?? []; - - $map['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $map['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['server_id'] = $serverId; @@ -1793,17 +1785,9 @@ class QueryController extends BaseController $subMap = ['promote_id' => ['in', $ids]]; if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - $gameId = $gameId ?? []; - - $map['uc.game_id'] = ['in', $gameId]; - $subMap['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $map['uc.game_id'] = ['in', $gameIds]; + $subMap['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['uc.server_id'] = $serverId; @@ -1875,7 +1859,7 @@ class QueryController extends BaseController ->field($field) ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id') ->where($map) - ->group('uc.role_id,uc.game_id,uc.user_id,uc.id') + ->group('uc.role_id,uc.game_id,uc.user_id') ->buildSql(); $query = M()->alias('record') ->table($subQuery) @@ -1886,7 +1870,7 @@ class QueryController extends BaseController $totalQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id') - ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id,uc.id') + ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id') ->where($map) ->buildSql(); $total = M()->alias('totals') @@ -2081,16 +2065,8 @@ class QueryController extends BaseController 'basicPromotes' => $basicPromotes, ]; if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - $gameId = $gameId ?? []; - - $params['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $params['game_id'] = ['in', $gameIds]; } if ($serverId > 0) { $params['server_id'] = $serverId; From f0322578383fb2d52fb265c3cd16a89d7927690a Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 11:30:50 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteGameRatioController.class.php | 19 +++++++++++++++++++ .../Model/PromoteGameRatioModel.class.php | 2 +- Application/Home/Common/function.php | 15 +++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 3e9105e12..ce6b4bba8 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -6,11 +6,30 @@ use Think\Controller; class PromoteGameRatioController extends ThinkController { + const MODEL_NAME = 'promote_game_ratio'; + public function lists() { $params = I('get.'); $promoteAccount = $params['promote_account'] ?? ''; $gameId = $params['game_id'] ?? 0; $status = $params['status'] ?? ''; + + $map['_string'] = '1 = 1'; + if ($promoteAccount) { + $promoteMap['account'] = $promoteAccount; + $promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id'); + $promoteId = $promoteId ?? 0; + $map['promote_id'] = $promoteId; + } + if ($gameId) { + $map['game_id'] = $gameId; + } + if ($status !== '') { + $map['status'] = $status; + } + + $field = 'create_time, update_time'; + $query = D(self::MODEL_NAME)->getLists(); } } \ No newline at end of file diff --git a/Application/Admin/Model/PromoteGameRatioModel.class.php b/Application/Admin/Model/PromoteGameRatioModel.class.php index 715ec4169..ea16a31f0 100644 --- a/Application/Admin/Model/PromoteGameRatioModel.class.php +++ b/Application/Admin/Model/PromoteGameRatioModel.class.php @@ -2,7 +2,7 @@ namespace Admin\Model; -class PromoteGameRatioModel +class PromoteGameRatioModel extends CommentModel { } \ No newline at end of file diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 1fb3c1774..d473d7d5c 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1197,4 +1197,19 @@ function promoteCan($promoteId, \Closure $callback) function getChildGameAddPermission($promoteId) { return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission'); +} + +function gameSearch($relationGameId, $sdkVersion) +{ + $map['_string'] = '1 = 1'; + if ($relationGameId != 0) { + $map['relation_game_id'] = $relationGameId; + } + if ($sdkVersion != 0) { + $map['sdk_version'] = $sdkVersion; + } + $gameIds = M('game', 'tab_')->where($map)->getField('id', true); + $gameIds = $gameIds ?? [-1]; + + return $gameIds; } \ No newline at end of file From f854ca6bbb1d7bb861c6d0613f65b593ca38a431 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 11:33:02 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Common/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 2827ba43b..d473d7d5c 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1201,7 +1201,7 @@ function getChildGameAddPermission($promoteId) function gameSearch($relationGameId, $sdkVersion) { - $map = '1 = 1'; + $map['_string'] = '1 = 1'; if ($relationGameId != 0) { $map['relation_game_id'] = $relationGameId; } From 9b64a3a4f10edf12d01850eafefd529ba12d0d0a Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 17 Dec 2019 11:44:56 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E8=A7=A6=E5=B1=8F=E5=AE=98=E7=BD=91?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- policy.html | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 policy.html diff --git a/policy.html b/policy.html new file mode 100644 index 000000000..134a7676c --- /dev/null +++ b/policy.html @@ -0,0 +1,125 @@ + + + + + 隐私政策 + + +

+ 隐私政策 +

+

+ 本应用尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更有个性化的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。但本应用将以高度的勤勉、审慎义务对待这些信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。本应用会不时更新本隐私权政策。 您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。本隐私权政策属于本应用服务使用协议不可分割的一部分。 +

+
    +
  1. + 适用范围 +
      +
    1. + 在您注册本应用帐号时,您根据本应用要求提供的个人注册信息; +
    2. +
    3. + 在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据; +
    4. +
    5. + 本应用通过合法途径从商业伙伴处取得的用户个人数据。 +
    6. +
    + 您了解并同意,以下信息不适用本隐私权政策: +
      +
    1. + 您在使用本应用平台提供的搜索服务时输入的关键字信息; +
    2. +
    3. + 本应用收集到的您在本应用发布的有关信息数据,包括但不限于参与活动、成交信息及评价详情; +
    4. +
    5. + 违反法律规定或违反本应用规则行为及本应用已对您采取的措施。 +
    6. + +
    +
  2. +
  3. + 信息使用 +
      +
    1. + 本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人信息,除非事先得到您的许可,或该第三方和本应用(含本应用关联公司)单独或共同为您提供服务,且在该服务结束后,其将被禁止访问包括其以前能够访问的所有这些资料。 +
    2. +
    3. + 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。 +
    4. +
    5. + 为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)。 +
    6. +
    +
  4. +
  5. + 信息披露
    + 在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息: +
      +
    1. + 经您事先同意,向第三方披露; +
    2. +
    3. + 为提供您所要求的产品和服务,而必须和第三方分享您的个人信息; +
    4. +
    5. + 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露; +
    6. +
    7. + 如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露; +
    8. +
    9. + 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷; +
    10. +
    11. + 在本应用平台上创建的某一交易中,如交易任何一方履行或部分履行了交易义务并提出信息披露请求的,本应用有权决定向该用户提供其交易对方的联络方式等必要信息,以促成交易的完成或纠纷的解决。 +
    12. +
    13. + 其它本应用根据法律、法规或者网站政策认为合适的披露。 +
    14. +
    +
  6. +
  7. + 信息存储和交换
    + 本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。 +
  8. +
  9. + Cookie的使用 +
      +
    1. + 在您未拒绝接受cookies的情况下,本应用会在您的计算机上设定或取用cookies ,以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务,包括推广服务。 +
    2. +
    3. + 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本应用网络服务或功能。 +
    4. +
    5. + 通过本应用所设cookies所取得的有关信息,将适用本政策。 +
    6. +
    +
  10. +
  11. + 信息安全 +
      +
    1. + 本应用帐号均有安全保护功能,请妥善保管您的用户名及密码信息。本应用将通过对用户密码进行加密等安全措施确保您的信息不丢失,不被滥用和变造。尽管有前述安全措施,但同时也请您注意在信息网络上不存在“完善的安全措施”。 +
    2. +
    3. + 在使用本应用网络服务进行网上交易时,您不可避免的要向交易对方或潜在的交易对 +
    4. +
    +
  12. +
  13. + 本隐私政策的更改 +
      +
    1. + 如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。 +
    2. +
    3. + 本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。 +
    4. +
    +
  14. +
+ + \ No newline at end of file From af3d1d755f68e98cbf113a17f2c03237c18386aa Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 17 Dec 2019 11:49:06 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E8=A7=A6=E5=B1=8F=E5=AE=98=E7=BD=91?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- policy.html | 1 - 1 file changed, 1 deletion(-) diff --git a/policy.html b/policy.html index 134a7676c..38831ca2e 100644 --- a/policy.html +++ b/policy.html @@ -1,5 +1,4 @@ - 隐私政策 From 62412fcf2b871cbc77555f188729600107aec061 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 17 Dec 2019 11:49:38 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E8=A7=A6=E5=B1=8F=E5=AE=98=E7=BD=91?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- policy.html | 1 - 1 file changed, 1 deletion(-) diff --git a/policy.html b/policy.html index 134a7676c..38831ca2e 100644 --- a/policy.html +++ b/policy.html @@ -1,5 +1,4 @@ - 隐私政策 From 4d070462ac2a8b97bd18abcf23edf13f9e12adba Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 12:33:09 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 63e44c57b..6f07d8ae2 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1782,16 +1782,13 @@ class QueryController extends BaseController $ids[] = $queryPromote['id']; $map = ['uc.promote_id' => ['in', $ids]]; - $subMap = ['promote_id' => ['in', $ids]]; if ($relationGameId != 0 || $sdkVersion != 0) { $gameIds = gameSearch($relationGameId, $sdkVersion); $map['uc.game_id'] = ['in', $gameIds]; - $subMap['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['uc.server_id'] = $serverId; - $subMap['server_id'] = $serverId; } if ($roleName != '') { $map['ui.role_name'] = ['like', $roleName . '%']; @@ -1857,9 +1854,9 @@ class QueryController extends BaseController $field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count'; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($field) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) - ->group('uc.role_id,uc.game_id,uc.user_id') + ->group('uc.role_id,uc.server_id,uc.game_id') ->buildSql(); $query = M()->alias('record') ->table($subQuery) @@ -1867,15 +1864,10 @@ class QueryController extends BaseController list($records, $pagination, $count) = $this->paginate($query); - $totalQuery = M('user_play_data_count', 'tab_')->alias('uc') + $total = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id') - ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id') + ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) - ->buildSql(); - $total = M()->alias('totals') - ->table($totalQuery) - ->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today') ->find(); foreach ($records as &$list) { From 0f3038ea183918dc81237d2c739b3b121fa955ec Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 12:33:59 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 63e44c57b..61112a16f 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1782,16 +1782,13 @@ class QueryController extends BaseController $ids[] = $queryPromote['id']; $map = ['uc.promote_id' => ['in', $ids]]; - $subMap = ['promote_id' => ['in', $ids]]; if ($relationGameId != 0 || $sdkVersion != 0) { $gameIds = gameSearch($relationGameId, $sdkVersion); $map['uc.game_id'] = ['in', $gameIds]; - $subMap['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['uc.server_id'] = $serverId; - $subMap['server_id'] = $serverId; } if ($roleName != '') { $map['ui.role_name'] = ['like', $roleName . '%']; @@ -1857,9 +1854,9 @@ class QueryController extends BaseController $field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count'; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($field) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) - ->group('uc.role_id,uc.game_id,uc.user_id') + ->group('uc.role_id,uc.server_id,uc.game_id') ->buildSql(); $query = M()->alias('record') ->table($subQuery) @@ -1867,15 +1864,10 @@ class QueryController extends BaseController list($records, $pagination, $count) = $this->paginate($query); - $totalQuery = M('user_play_data_count', 'tab_')->alias('uc') + $total = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) - ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id') - ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id') + ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->where($map) - ->buildSql(); - $total = M()->alias('totals') - ->table($totalQuery) - ->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today') ->find(); foreach ($records as &$list) { @@ -1944,7 +1936,7 @@ class QueryController extends BaseController public function getSubPromotes() { - $promoteId = I('promote_id', 0); + $promoteId = I('promote_id', 0) ?: -1; $promotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promoteId])->select(); $this->ajaxReturn([ 'status' => 1, From fc2596a7cc47819b0b23d773993047fef277ab3c Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 17 Dec 2019 14:58:04 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E5=85=85=E5=80=BC=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E5=BD=93=E5=A4=A9=E6=97=B6=E9=97=B4=E5=8C=85=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 012598ebe..0a524b649 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -3178,7 +3178,7 @@ class DownloadController extends BaseController { unset($map['costbegin']); unset($map['costend']); $nowTime = strtotime(date('Y-m-d 00:00:00', time())); - $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; + $subMap['create_time'] = ['between', [$map['begintime'], $map['endtime']-1]]; if ($costBegin != '' || $costEnd != '') { $having = ''; if ($costBegin != '' && $costEnd != '') { @@ -3196,7 +3196,7 @@ class DownloadController extends BaseController { $map['_string'] = 'ui.role_id in (' . $subQuery . ')'; } $secondDay = 24*3600 + 1; - $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - $secondDay]]; + $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime']-1]]; unset($map['begintime']); unset($map['endtime']); //$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id'; From bd8c4331bd7c9ecce49dc6cf79fa5a35428911bd Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 16:17:41 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0>?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=AE=A1=E7=90=86>=E5=85=AC?= =?UTF-8?q?=E4=BC=9A=E5=88=86=E6=88=90=E7=AE=A1=E7=90=86--=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 58 +++ .../PromoteGameRatioController.class.php | 104 ++++- .../Model/PromoteGameRatioModel.class.php | 7 +- .../Admin/View/PromoteGameRatio/lists.html | 415 ++++++++++++++++++ 4 files changed, 578 insertions(+), 6 deletions(-) create mode 100644 Application/Admin/View/PromoteGameRatio/lists.html diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index c76087014..41e989032 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -605,4 +605,62 @@ function encryptIdCard($str) { $stars_str = "****"; } return substr_replace($str, $stars_str, $length-4, 4); +} + +//获取推广员资质审核状态 $type 1-获取数组 2-获取文本 +function getPromoteVerStatus($status, $type = 1) +{ + $statusList = [ + 0 => '未认证', + 1 => '审核成功', + 2 => '审核失败', + 3 => '审核中', + 4 => '修改审核中', + ]; + + $records = null; + switch ($type) { + case 1: + $records = $status; + break; + case 2: + $records = $statusList[$status] ?? '未知'; + break; + default: + $records = false; + break; + } + return $records; +} + +//获取推广员账号 +function getPromoteAccount($promoteId) +{ + $map['id'] = intval($promoteId); + return M('promote', 'tab_')->where($map)->getField('account'); +} + +//获取推广员列表 $level 0-全部 +function getPromoteByLevel($level = 0) +{ + $field = 'id, account, real_name'; + if ($level) { + $map['level'] = $level; + $promotes = M('promote', 'tab_')->field($field)->where($map)->select(); + } else { + $promotes = M('promote', 'tab_')->field($field)->select(); + } + return $promotes; +} + +//获取游戏列表 +function getAllGameList($groupByRelation = false) +{ + $field = 'id, game_name, relation_game_id, relation_game_name'; + if ($groupByRelation) { + $games = M('game', 'tab_')->field($field)->group('relation_game_id')->select(); + } else { + $games = M('game', 'tab_')->field($field)->select(); + } + return $games; } \ No newline at end of file diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index ce6b4bba8..6e358417b 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -7,6 +7,15 @@ use Think\Controller; class PromoteGameRatioController extends ThinkController { const MODEL_NAME = 'promote_game_ratio'; + const STATUS_REFUSE = -1; + const STATUS_WAIT = 0; + const STATUS_PASS = 1; + + public static $statusList = [ + self::STATUS_REFUSE => '审核未通过', + self::STATUS_WAIT => '待审核', + self::STATUS_PASS => '已审核', + ]; public function lists() { @@ -14,22 +23,109 @@ class PromoteGameRatioController extends ThinkController $promoteAccount = $params['promote_account'] ?? ''; $gameId = $params['game_id'] ?? 0; $status = $params['status'] ?? ''; + $page = $params['p'] ? intval($params['p']) : 1; + $row = $params['row'] ? intval($params['row']) : 10; $map['_string'] = '1 = 1'; if ($promoteAccount) { - $promoteMap['account'] = $promoteAccount; + $promoteMap['account'] = trim($promoteAccount); $promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id'); $promoteId = $promoteId ?? 0; $map['promote_id'] = $promoteId; } if ($gameId) { - $map['game_id'] = $gameId; + $map['game_id'] = intval($gameId); } if ($status !== '') { - $map['status'] = $status; + $map['status'] = intval($status); } $field = 'create_time, update_time'; - $query = D(self::MODEL_NAME)->getLists(); + $promoteGameRatios = D(self::MODEL_NAME)->field($field, true) + ->where($map) + ->page($page, $row) + ->order('update_time desc, id desc') + ->select(); + $count = D(self::MODEL_NAME)->where($map)->count(); + + $records = []; + if ($promoteGameRatios) { + $promoteIds = array_column($promoteGameRatios, 'promote_id'); + $gameIds = array_column($promoteGameRatios, 'game_id'); + $promoteFiled = 'id, account, mobile_phone, create_time, status, ver_status'; + $gameFiled = 'id, game_name, ratio'; + $promotes = M('promote', 'tab_')->where(array('id' => ['in', $promoteIds]))->getField($promoteFiled, true); + $games = M('game', 'tab_')->where(array('id' => ['in', $gameIds]))->getField($gameFiled, true); + + foreach ($promoteGameRatios as $promoteGameRatio) { + $thisPromoteId = $promoteGameRatio['promote_id']; + $thisGameId = $promoteGameRatio['game_id']; + $issetPromote = isset($promotes[$thisPromoteId]); + $issetGame = isset($games[$thisGameId]); + $thisPromoteAccount = '未知'; + $thisPromoteMobilePhone = '未知'; + $thisPromoteCreateTime = '未知'; + $thisPromoteStatus = '未知'; + $thisPromoteVerStatus = '未知'; + $thisGameName = '未知'; + $thisGameRatio = '0.00'; + $thisApplicant = getPromoteAccount($promoteGameRatio['applicant_id']); + $thisReviewer = $promoteGameRatio['reviewer_id'] ? getPromoteAccount($promoteGameRatio['reviewer_id']) : '待确认'; + if ($promoteGameRatio['ratio'] > 0) { + $thisBeninTime = date('Y/m/d', $promoteGameRatio['begin_time']); + $thisEndTime = date('Y/m/d', $promoteGameRatio['end_time']); + } else { + $thisBeninTime = date('Y/m/d', $this->getPromoteApplyCreateTime($thisPromoteId, $thisGameId)); + $thisEndTime = '永久'; + } + $validDate = $thisBeninTime . ' - ' . $thisEndTime; + if ($issetPromote) { + $thisPromoteAccount = $promotes[$thisPromoteId]['account']; + $thisPromoteMobilePhone = $promotes[$thisPromoteId]['mobile_phone']; + $thisPromoteCreateTime = date('Y-m-d H:i:s', $promotes[$thisPromoteId]['create_time']); + $thisPromoteStatus = get_status_title($promotes[$thisPromoteId]['status']); + $thisPromoteStatus = $thisPromoteStatus ?? '未知'; + $thisPromoteVerStatus = getPromoteVerStatus($promotes[$thisPromoteId]['status'], 2); + } + if ($issetGame) { + $thisGameName = $games[$thisGameId]['game_name']; + $thisGameRatio = $games[$thisGameId]['ratio']; + $thisGameRatio = $thisGameRatio ?? '0.00'; + } + + $records[] = [ + 'id' => $promoteGameRatio['id'], + 'promote_id' => $promoteGameRatio['promote_id'], + 'promote_account' => $thisPromoteAccount, + 'promote_mobile_phone' => $thisPromoteMobilePhone, + 'promote_create_time' => $thisPromoteCreateTime, + 'promote_status_text' => $thisPromoteStatus, + 'promote_ver_status_text' => $thisPromoteVerStatus, + 'game_name' => $thisGameName, + 'game_ratio' => $thisGameRatio . '%', + 'ratio' => $promoteGameRatio['ratio'] . '%', + 'valid_date' => $validDate, + 'remark' => $promoteGameRatio['remark'], + 'status_text' => self::$statusList[$promoteGameRatio['status']], + 'applicant' => $thisApplicant ?? '未知', + 'reviewer' => $thisReviewer ?? '未知', + ]; + } + } + + $this->assign('records', $records); + $this->assign('count', $count); + $this->assign('gameList', getAllGameList()); + $this->assign('promoteList', getPromoteByLevel(1)); + $this->meta_title = '公会分成管理'; + $this->display(); + } + + private function getPromoteApplyCreateTime($promoteId, $gameId) + { + $map['promote_id'] = $promoteId; + $map['game_id'] = $gameId; + $createTime = $apply = M('apply', 'tab_')->where($map)->getField('apply_time'); + return $createTime; } } \ No newline at end of file diff --git a/Application/Admin/Model/PromoteGameRatioModel.class.php b/Application/Admin/Model/PromoteGameRatioModel.class.php index ea16a31f0..b6715ba2d 100644 --- a/Application/Admin/Model/PromoteGameRatioModel.class.php +++ b/Application/Admin/Model/PromoteGameRatioModel.class.php @@ -2,7 +2,10 @@ namespace Admin\Model; -class PromoteGameRatioModel extends CommentModel -{ +use Think\Model; +class PromoteGameRatioModel extends Model +{ + // 数据表前缀 + protected $tablePrefix = 'tab_'; } \ No newline at end of file diff --git a/Application/Admin/View/PromoteGameRatio/lists.html b/Application/Admin/View/PromoteGameRatio/lists.html new file mode 100644 index 000000000..b00ab7fc0 --- /dev/null +++ b/Application/Admin/View/PromoteGameRatio/lists.html @@ -0,0 +1,415 @@ + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ +
+
+ +
+
+ 搜索 +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 会长ID会长账号手机号码注册时间状态身份状态已申请游戏原分成比例当前分成比例开始时间备注分成比例审核申请人确认人操作
aOh! 暂时还没有内容!
{$record.promote_id}{$record.promote_account}{$record.promote_mobile_phone}{$record.promote_create_time}{$record.promote_status_text}{$record.promote_ver_status_text}{$record.game_name}{$record.game_ratio}{$record.ratio}{$record.valid_date}{$record.remark}{$record.status_text}{$record.applicant}{$record.reviewer} + 修改 +
+
+ +
+
+ 导出 + {$_page|default=''} +
+ + + +
+ + + + + + From a19a7b530eadbb7bc033d1da0e1bb6d537300aaa Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 16:20:17 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=A6=82=E5=86=B5--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 6f07d8ae2..66b79687d 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1114,6 +1114,7 @@ class QueryController extends BaseController $summaryData = []; $dayList = $this->getDayList($begTime, $endTime); + $dayList = array_reverse($dayList); $params['dayList'] = $dayList; $records = []; From 3e5588ff3d9efb05219aa27c38aab51e390efa0b Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 16:21:46 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=A6=82=E5=86=B5--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/QueryController.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 61112a16f..71aba2c4c 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1114,6 +1114,7 @@ class QueryController extends BaseController $summaryData = []; $dayList = $this->getDayList($begTime, $endTime); + $dayList = array_reverse($dayList); $params['dayList'] = $dayList; $records = []; From 60fff33fca2130261b72868238ab33268c13de66 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 17 Dec 2019 17:22:45 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=AE=A1=E7=90=86>=E5=85=85=E5=80=BC?= =?UTF-8?q?=E7=8E=A9=E5=AE=B6--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 66b79687d..7b1c4b9ba 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1114,6 +1114,7 @@ class QueryController extends BaseController $summaryData = []; $dayList = $this->getDayList($begTime, $endTime); + $dayListReverse = $dayList; $dayList = array_reverse($dayList); $params['dayList'] = $dayList; @@ -1185,7 +1186,9 @@ class QueryController extends BaseController $allData['spend_binding'] = bcadd($allData['spend_binding'], $spendBindingList[$day], 2); $allData['spend_discount'] = bcadd($allData['spend_discount'], 0, 2); $allData['spend_voucher'] = bcadd($allData['spend_voucher'], 0, 2); - + } + foreach ($dayListReverse as $day) { + $date = date('Ymd', strtotime($day)); $summaryData['date'][] = $date; $summaryData['role_num'][] = $roleNumList[$day]; $summaryData['user_num'][] = $userNumList[$day]; @@ -1865,10 +1868,15 @@ class QueryController extends BaseController list($records, $pagination, $count) = $this->paginate($query); - $total = M('user_play_data_count', 'tab_')->alias('uc') + $totalQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($fieldUC) - ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') + ->join('left join tab_user_play_info as ui on ui.user_id = uc.user_id and ui.game_id = uc.game_id and uc.server_id = ui.server_id and ui.role_id = uc.role_id') + ->group('uc.role_id,uc.game_id,uc.server_id,uc.user_id') ->where($map) + ->buildSql(); + $total = M()->alias('totals') + ->table($totalQuery) + ->field('sum(recharge_cost) recharge_cost,sum(recharge_count) recharge_count,sum(recharge_cost_today) as recharge_cost_today') ->find(); foreach ($records as &$list) { From 2cb7d9bdfdb06e67752bf4a2841513d7745e262b Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Tue, 17 Dec 2019 17:33:02 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E6=89=B6=E6=8C=81=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=B5=8B=E8=AF=95=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Support/lists.html | 12 ++++++------ .../Admin/View/TestResource/supportNumberList.html | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Application/Admin/View/Support/lists.html b/Application/Admin/View/Support/lists.html index 8c82c84d7..f5619647f 100644 --- a/Application/Admin/View/Support/lists.html +++ b/Application/Admin/View/Support/lists.html @@ -32,7 +32,7 @@
-

扶持发放

+

资源发放

说明:记录所有扶持发放的数据

@@ -77,8 +77,8 @@
@@ -111,7 +111,7 @@ 区服 角色名 申请额度 - 扶持类型 + 资源类型 备注 申请时间 可用额度 @@ -134,7 +134,7 @@ {$data['server_name']} {$data['role_name']} {$data['apply_resource']} - 新增扶持后续扶持 + 新增资源后续资源 {$data['apply_remark']} {:date('Y-m-d H:i:s',$data['create_time'])} @@ -170,7 +170,7 @@
- 导出 + 导出 {$_page|default=''}
diff --git a/Application/Admin/View/TestResource/supportNumberList.html b/Application/Admin/View/TestResource/supportNumberList.html index f996a2501..c95054689 100644 --- a/Application/Admin/View/TestResource/supportNumberList.html +++ b/Application/Admin/View/TestResource/supportNumberList.html @@ -33,11 +33,11 @@