From 3053461ee55b6c6d17d54ec43dd447d4fdbccfd1 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 2 Dec 2020 14:46:58 +0800 Subject: [PATCH 01/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A5=96=E7=BD=9A?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatementMangementController.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 4f72beed3..62e907d73 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -327,6 +327,7 @@ class StatementMangementController extends ThinkController ->field('r.id') ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT') ->where($map) + ->order("r.id desc") ->group('r.id') ->select(); @@ -345,10 +346,11 @@ class StatementMangementController extends ThinkController $list = M('reward_record', 'tab_')->alias('r') ->field(' - r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id, + r.id, r.relation_game_id, r.settlement_time, r.confirm_time, r.content, r.reward_type, r.creater_id,r.create_time, rd.id as rid, rd.type as detail_type, rd.company_type as detail_company_type, rd.company_id as detail_company_id , rd.company_name as detail_company_name, rd.settlement_type as detail_settlement_type, rd.promote_account as detail_promote_account,rd.amount as detail_amount ') ->where($map) + ->order("rid desc") ->join('tab_reward_detail as rd on rd.record_id = r.id', 'LEFT')->select(); if ($list) { $record = []; @@ -397,7 +399,7 @@ class StatementMangementController extends ThinkController if ($page) { $this->assign('_page', $page); } - ksort($record); + krsort($record); $this->assign('list', $record); $this->assign('promoters', array_column(M('promote', 'tab_')->where(['level'=>1])->field('id, nickname, account')->select(), null, 'id')); From d06cc0ea10b59fd172c45e2cfa1ab94939ca39cf Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 2 Dec 2020 15:06:00 +0800 Subject: [PATCH 02/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=90=8C=E5=85=AC=E5=8F=B8=E5=A5=96=E7=BD=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StatementMangement/rewardManageSave.html | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Application/Admin/View/StatementMangement/rewardManageSave.html b/Application/Admin/View/StatementMangement/rewardManageSave.html index f069fc8ca..cf799ec59 100644 --- a/Application/Admin/View/StatementMangement/rewardManageSave.html +++ b/Application/Admin/View/StatementMangement/rewardManageSave.html @@ -448,23 +448,23 @@ var flag = false; // 判断相反的是否已经存在该公司节点 - $('.reward-data-info,.punish-data-info').each(function(){ - var node_info = $(this).find('.info').val(); - if (node_info) { - var otherData = JSON.parse(node_info); - // console.log(otherData) - // console.log((data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ); - // console.log(data['company_type'] == otherData['company_type'] ); - // 判断对立面是否有相同的公司或者部门 - if ((data['company_type'] == otherData['company_type']) - && (data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ) { - //console.log('已有相此公司的奖罚,请检查') - layer.closeAll(); - layer.msg('已有此公司的奖罚,请检查'); - flag = true; - } - } - }); + // $('.reward-data-info,.punish-data-info').each(function(){ + // var node_info = $(this).find('.info').val(); + // if (node_info) { + // var otherData = JSON.parse(node_info); + // // console.log(otherData) + // // console.log((data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ); + // // console.log(data['company_type'] == otherData['company_type'] ); + // // 判断对立面是否有相同的公司或者部门 + // if ((data['company_type'] == otherData['company_type']) + // && (data['company_id'] != '0' ? data['company_id'] == otherData['company_id'] : data['company_name'] == otherData['company_name']) ) { + // //console.log('已有相此公司的奖罚,请检查') + // layer.closeAll(); + // layer.msg('已有此公司的奖罚,请检查'); + // flag = true; + // } + // } + // }); if (flag) { return false; From 88402dfac0853fd11cc516aba021553b82de4dd1 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 3 Dec 2020 18:34:11 +0800 Subject: [PATCH 03/29] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestingResourceController.class.php | 18 +++++++++------ .../Admin/View/TestingResource/batches.html | 16 ++++++++++++-- .../Admin/View/TestingResource/orders.html | 2 -- .../TestingResourceRepository.class.php | 22 ++++++++++++++++++- .../Service/TestingResourceService.class.php | 9 +++++--- .../TestingResourceController.class.php | 1 - .../View/default/TestingResource/batches.html | 2 -- .../View/default/TestingResource/orders.html | 2 -- 8 files changed, 52 insertions(+), 20 deletions(-) diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index 1946fa047..a139edbae 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -212,7 +212,8 @@ class TestingResourceController extends ThinkController 'user_account' => '测试账号', 'user_phone' => '手机号', 'promote_account' => '所属推广员', - 'apply_promote_account' => '申请人', + 'apply_username' => '申请人', + 'verify_admin_username' => '审核人', 'apply_amount' => '申请金额', 'provide_amount' => '发放金额', 'verify_status_text' => '审核状态', @@ -230,10 +231,13 @@ class TestingResourceController extends ThinkController $gameId = $params['game_id'] ?? 0; + $admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->select(); + $this->assign('verifyStatusList', TestingResourceRepository::$verifyStatusList); $this->assign('provideStatusList', TestingResourceRepository::$provideStatusList); $this->assign('servers', $gameRepository->getServersByGameId($gameId)); $this->assign('games', $gameRepository->getChoiceGames()); + $this->assign('admins', $admins); $this->assign('count', $count); $this->assign('_page', $pagination); $this->assign('records', $records); @@ -266,7 +270,6 @@ class TestingResourceController extends ThinkController 'user_account' => $role['user_account'], 'server_name' => $role['server_name'], 'role_name' => $role['role_name'], - 'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '', 'promote_account' => $promote['account'], 'ref_name' => $order['ref_name'], 'ref_amount' => $order['ref_amount'], @@ -337,9 +340,10 @@ class TestingResourceController extends ThinkController public function doApply() { $params = I('post.'); + $userAuth = session('user_auth'); try { $testingResourceService = new TestingResourceService(); - $testingResourceService->apply($params); + $testingResourceService->apply($params, null, $userAuth['uid']); return $this->ajaxReturn(['status' => 1, 'message' => '申请成功,等待审核。']); } catch (\Throwable $e) { return $this->ajaxReturn(['status' => 0, 'message' => $e->getMessage()]); @@ -362,11 +366,13 @@ class TestingResourceController extends ThinkController if (count($batches) == 0) { return $this->ajaxReturn(['status' => 0, 'message' => '无未审核批次']); } + $userAuth = session('user_auth'); foreach ($batches as $batch) { if ($status == 1) { - $service->verify($batch); + $service->verify($batch, $userAuth['uid']); } elseif ($status == 2) { - $service->verifyRefuse($batch); + $remark = '审核拒绝'; + $service->verifyRefuse($batch, $remark, $userAuth['uid']); } } return $this->ajaxReturn(['status' => 1, 'message' => '操作成功']); @@ -533,7 +539,6 @@ class TestingResourceController extends ThinkController 'user_account' => $role ? $role['user_account'] : '', 'server_name' => $role ? $role['server_name'] : '', 'role_name' => $role ? $role['role_name'] : '', - 'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '', 'promote_account' => $promote ? $promote['account'] : '', 'ref_name' => $order['ref_name'], 'ref_amount' => $order['ref_amount'], @@ -552,7 +557,6 @@ class TestingResourceController extends ThinkController 'server_name' => '区服名称', 'user_account' => '测试账号', 'role_name' => '角色名称', - 'apply_promote_account' => '申请人', 'promote_account' => '所属推广员', 'ref_name' => '资源名称', 'ref_amount' => '资源价值', diff --git a/Application/Admin/View/TestingResource/batches.html b/Application/Admin/View/TestingResource/batches.html index 86e067442..09ef58c62 100644 --- a/Application/Admin/View/TestingResource/batches.html +++ b/Application/Admin/View/TestingResource/batches.html @@ -143,6 +143,16 @@ +
+ +
搜索 导出批次订单 @@ -178,7 +188,8 @@ 测试账号 手机号 所属推广员 - 申请人 + 申请人 + 审核人 申请金额 发放金额 @@ -211,7 +222,8 @@ {$record.user_account} {$record.user_phone} {$record.promote_account} - {$record.apply_promote_account} + {$record.apply_username} + {$record.verify_admin_username} {$record.apply_amount} {$record.provide_amount} diff --git a/Application/Admin/View/TestingResource/orders.html b/Application/Admin/View/TestingResource/orders.html index 7a953cc23..78d0589ae 100644 --- a/Application/Admin/View/TestingResource/orders.html +++ b/Application/Admin/View/TestingResource/orders.html @@ -45,7 +45,6 @@ body { 玩家账号 区服名称 角色名称 - 申请人 资源内容 资源价值 申请数量 @@ -72,7 +71,6 @@ body { {$record.user_account} {$record.server_name} {$record.role_name} - {$record.apply_promote_account} {$record.ref_name} {$record.ref_amount} {$record.num} diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index ad62b42b0..51a3c47fc 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -88,6 +88,7 @@ class TestingResourceRepository $verifyStatus = $params['verify_status'] ?? -1; $provideStatus = $params['provide_status'] ?? -1; $account = $params['account'] ?? ''; + $adminId = $params['admin_id'] ?? -1; $conditions = []; $conditions['_string'] = '1=1'; @@ -113,6 +114,9 @@ class TestingResourceRepository if ($provideStatus != -1) { $conditions['provide_status'] = $provideStatus; } + if ($adminId != -1) { + $conditions['verify_admin_id'] = $adminId; + } if ($gameId) { $conditions['game_id'] = $gameId; } @@ -136,6 +140,8 @@ class TestingResourceRepository $applyPromotes = []; $users = []; $promotes = []; + $verifyAdmins = []; + $applyAdmins = []; if (count($batches) > 0) { $gameRoleIds = []; foreach ($batches as $batch) { @@ -153,16 +159,25 @@ class TestingResourceRepository $applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select(); $applyPromotes = index_by_column('id', $applyPromotes); + $applyAdminIds = array_column('apply_admin_id', $batches); + $applyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $applyAdminIds]])->select(); + $applyAdmins = index_by_column('id', $applyAdmins); + if (count($users) > 0) { $promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select(); $promotes = index_by_column('id', $promotes); } + $verifyAdminIds = array_column('verify_admin_id', $batches); + $verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select(); + $verifyAdmins = index_by_column('id', $verifyAdmins); } return [ 'roles' => $roles, 'applyPromotes' => $applyPromotes, 'users' => $users, 'promotes' => $promotes, + 'verifyAdmins' => $verifyAdmins, + 'applyAdmins' => $applyAdmins, ]; } @@ -173,6 +188,8 @@ class TestingResourceRepository $applyPromotes = $result['applyPromotes']; $users = $result['users']; $promotes = $result['promotes']; + $verifyAdmins = $result['verifyAdmins']; + $applyAdmins = $result['applyAdmins']; $records = []; foreach ($batches as $batch) { @@ -181,6 +198,8 @@ class TestingResourceRepository $user = $users[$batch['user_id']] ?? null; $applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null; $promote = $user && isset($promotes[$user['promote_id']]) ? $promotes[$user['promote_id']] : null; + $verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null; + $applyAdmin = $applyAdmins[$batch['apply_admin_id']] ?? null; $records[] = [ 'id' => $batch['id'], 'batch_no' => substr($batch['batch_no'], 14), @@ -190,8 +209,9 @@ class TestingResourceRepository 'role_name' => $role ? $role['role_name'] : '--', 'user_account' => $role ?$role['user_account'] : '--', 'user_phone' => $user ? $user['phone'] : '', - 'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '', + 'apply_username' => $applyPromote ? $applyPromote['account'] . '[推广员]' : ($applyAdmin ? $applyAdmin['username'] . '[管理员]' : ''), 'promote_account' => $promote['account'], + 'verify_admin_username' => $verifyAdmin ? $verifyAdmin['username'] : '系統', // 'history_provide_amount' => 0.00, 'apply_amount' => $batch['apply_amount'], 'provide_amount' => $batch['provide_amount'], diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 9d28e4856..42012e159 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -15,7 +15,7 @@ class TestingResourceService $this->repository = new TestingResourceRepository(); } - public function verify($batch) + public function verify($batch, $verifyAdminId = 0) { if ($batch['verify_status'] != 0) { throw new \Exception('审核状态异常'); @@ -35,10 +35,11 @@ class TestingResourceService $batchData['verify_status'] = 1; $batchData['verify_remark'] = '审核成功'; + $batchData['verify_admin_id'] = $verifyAdminId; M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData); } - public function verifyRefuse($batch, $remark = '审核拒绝') + public function verifyRefuse($batch, $remark = '审核拒绝', $verifyAdminId = 0) { if ($batch['verify_status'] != 0) { throw new \Exception('审核状态异常'); @@ -49,6 +50,7 @@ class TestingResourceService $batchData['update_time'] = time(); $batchData['verify_status'] = 2; $batchData['verify_remark'] = $remark; + $batchData['verify_admin_id'] = $verifyAdminId; M('testing_resource_batch', 'tab_')->where(['id' => $batch['id']])->save($batchData); } @@ -341,7 +343,7 @@ class TestingResourceService return M('testing_binding', 'tab_')->where(['id' => $bindingId])->delete(); } - public function apply($params, $promote = null) + public function apply($params, $promote = null, $adminId = 0) { $gameId = $params['game_id'] ?? 0; $roleId = $params['role_id'] ?? ''; @@ -486,6 +488,7 @@ class TestingResourceService 'role_id' => $roleId, 'server_id' => $serverId, 'apply_promote_id' => $promote ? $promote['id'] : 0, + 'apply_admin_id' => $adminId, 'apply_amount' => $amount, 'provide_status' => 0, 'verify_status' => 0, diff --git a/Application/Home/Controller/TestingResourceController.class.php b/Application/Home/Controller/TestingResourceController.class.php index 9f08d400b..1d8f5bea8 100644 --- a/Application/Home/Controller/TestingResourceController.class.php +++ b/Application/Home/Controller/TestingResourceController.class.php @@ -100,7 +100,6 @@ class TestingResourceController extends BaseController 'user_account' => $role['user_account'], 'server_name' => $role['server_name'], 'role_name' => $role['role_name'], - 'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '', 'promote_account' => $promote['account'], 'ref_name' => $order['ref_name'], 'ref_amount' => $order['ref_amount'], diff --git a/Application/Home/View/default/TestingResource/batches.html b/Application/Home/View/default/TestingResource/batches.html index 919e850d8..919674553 100644 --- a/Application/Home/View/default/TestingResource/batches.html +++ b/Application/Home/View/default/TestingResource/batches.html @@ -119,7 +119,6 @@ 测试账号 手机号 所属推广员 - 申请人 申请金额 发放金额 @@ -147,7 +146,6 @@ {$record.user_account} {$record.user_phone} {$record.promote_account} - {$record.apply_promote_account} {$record.apply_amount} {$record.provide_amount} diff --git a/Application/Home/View/default/TestingResource/orders.html b/Application/Home/View/default/TestingResource/orders.html index 94cc39a71..9f58c39fc 100644 --- a/Application/Home/View/default/TestingResource/orders.html +++ b/Application/Home/View/default/TestingResource/orders.html @@ -106,7 +106,6 @@ 玩家账号 区服名称 角色名称 - 申请人 资源内容 资源价值 申请数量 @@ -129,7 +128,6 @@ {$record.user_account} {$record.server_name} {$record.role_name} - {$record.apply_promote_account} {$record.ref_name} {$record.ref_amount} {$record.num} From 78caa452b2b67f6824f180b7d7745174216c6b8b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 4 Dec 2020 10:12:10 +0800 Subject: [PATCH 04/29] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A1=E6=A0=B8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/TestingResourceController.class.php | 8 ++++++++ .../Base/Repository/TestingResourceRepository.class.php | 4 ++-- Data/update.sql | 7 ++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index a139edbae..581ecf923 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -516,6 +516,10 @@ class TestingResourceController extends ThinkController $applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select(); $applyPromotes = index_by_column('id', $applyPromotes); + $verifyAdminIds = array_column($batches, 'verify_admin_id'); + $verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select(); + $verifyAdmins = index_by_column('id', $verifyAdmins); + $promotes = []; if (count($roles) > 0) { $promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($roles, 'promote_id')]])->select(); @@ -531,6 +535,8 @@ class TestingResourceController extends ThinkController $role = isset($roles[$roleKey]) ? $roles[$roleKey] : null; $applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null; $promote = $role ? ($promotes[$role['promote_id']] ?? null) : null; + $verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null; + $records[] = [ 'id' => $order['id'], 'batch_no' => substr($batch['batch_no'], 14), @@ -540,6 +546,7 @@ class TestingResourceController extends ThinkController 'server_name' => $role ? $role['server_name'] : '', 'role_name' => $role ? $role['role_name'] : '', 'promote_account' => $promote ? $promote['account'] : '', + 'verify_admin_username' => $verifyAdmin ? $verifyAdmin['username'] : '系統', 'ref_name' => $order['ref_name'], 'ref_amount' => $order['ref_amount'], 'num' => $order['num'], @@ -558,6 +565,7 @@ class TestingResourceController extends ThinkController 'user_account' => '测试账号', 'role_name' => '角色名称', 'promote_account' => '所属推广员', + 'verify_admin_username' => '审核人', 'ref_name' => '资源名称', 'ref_amount' => '资源价值', 'num' => '申请数量', diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index 51a3c47fc..5abe28999 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -159,7 +159,7 @@ class TestingResourceRepository $applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select(); $applyPromotes = index_by_column('id', $applyPromotes); - $applyAdminIds = array_column('apply_admin_id', $batches); + $applyAdminIds = array_column($batches, 'apply_admin_id'); $applyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $applyAdminIds]])->select(); $applyAdmins = index_by_column('id', $applyAdmins); @@ -167,7 +167,7 @@ class TestingResourceRepository $promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select(); $promotes = index_by_column('id', $promotes); } - $verifyAdminIds = array_column('verify_admin_id', $batches); + $verifyAdminIds = array_column($batches, 'verify_admin_id'); $verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select(); $verifyAdmins = index_by_column('id', $verifyAdmins); } diff --git a/Data/update.sql b/Data/update.sql index 7a48acc83..25dcc3d3a 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2724,4 +2724,9 @@ ADD COLUMN `is_site_custom` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否定制 ALTER TABLE `tab_promote_company` ADD COLUMN `site_domain_prefix` varchar(20) NOT NULL DEFAULT '' COMMENT '推广后台域名前缀' AFTER `is_site_custom`; ALTER TABLE `tab_promote_company` -ADD COLUMN `site_config` varchar(255) NOT NULL DEFAULT '' COMMENT '推广后台网站配置' AFTER `is_site_custom`; \ No newline at end of file +ADD COLUMN `site_config` varchar(255) NOT NULL DEFAULT '' COMMENT '推广后台网站配置' AFTER `is_site_custom`; + +ALTER TABLE `tab_testing_resource_batch` +ADD COLUMN `verify_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '審核管理員ID' AFTER `verify_status`; +ALTER TABLE `tab_testing_resource_batch` +ADD COLUMN `apply_admin_id` int(11) NOT NULL DEFAULT 0 COMMENT '申請管理員ID' AFTER `apply_promote_id`; \ No newline at end of file From c8f082cee84324a595559218b43cf7b59a47e5af Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 4 Dec 2020 10:18:59 +0800 Subject: [PATCH 05/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Repository/TestingResourceRepository.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index 5abe28999..7c152f5d3 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -211,7 +211,7 @@ class TestingResourceRepository 'user_phone' => $user ? $user['phone'] : '', 'apply_username' => $applyPromote ? $applyPromote['account'] . '[推广员]' : ($applyAdmin ? $applyAdmin['username'] . '[管理员]' : ''), 'promote_account' => $promote['account'], - 'verify_admin_username' => $verifyAdmin ? $verifyAdmin['username'] : '系統', + 'verify_admin_username' => $batch['verify_status'] == 0 ? '--' : ($verifyAdmin ? $verifyAdmin['username'] : '系統'), // 'history_provide_amount' => 0.00, 'apply_amount' => $batch['apply_amount'], 'provide_amount' => $batch['provide_amount'], From 31ce7b071c4236cd1a48833dc700768649c9f8cb Mon Sep 17 00:00:00 2001 From: tping Date: Fri, 4 Dec 2020 11:19:35 +0800 Subject: [PATCH 06/29] 1211 --- Application/Admin/View/Game/add.html | 9 +++++++++ Application/Admin/View/Game/edit.html | 9 +++++++++ Application/Admin/View/PromoteCompany/add.html | 15 +++++++++++++++ Application/Admin/View/PromoteCompany/edit.html | 15 +++++++++++++++ Application/Admin/View/PromoteCompany/view.html | 17 +++++++++++++++++ .../Service/PromoteCompanyService.class.php | 3 +++ .../Home/Controller/BaseController.class.php | 9 +++++++-- 7 files changed, 75 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Game/add.html b/Application/Admin/View/Game/add.html index 1575e142f..199f3a918 100644 --- a/Application/Admin/View/Game/add.html +++ b/Application/Admin/View/Game/add.html @@ -676,6 +676,15 @@ + + 安卓IOS数据是否互通 + + + +
diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index e36b7e21e..dcd64a47c 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -892,6 +892,15 @@ + + 安卓IOS数据是否互通 + + + + diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index bdb3d7dcd..9458bb484 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -376,6 +376,21 @@ + + *是否特殊公司: + + + + + + + + + *推广后台域名前缀: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index 0355e6ba4..42ce732e4 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -378,6 +378,21 @@ + + *是否特殊公司: + + + + + + + + + style="display:none"> *推广后台域名前缀: diff --git a/Application/Admin/View/PromoteCompany/view.html b/Application/Admin/View/PromoteCompany/view.html index 64e2764bd..0a3ee62b5 100644 --- a/Application/Admin/View/PromoteCompany/view.html +++ b/Application/Admin/View/PromoteCompany/view.html @@ -392,6 +392,23 @@ + + *是否特殊公司: + + + + + + + + + '无', ]; + const TYPE_NORMAL = 0; // 默认推广公司 + const TYPE_CUSTOM = 1; // 定制推广公司 隐藏某些功能 + public function getOutBelongs() { return [ diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 5e3561338..95da267e3 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -2,6 +2,7 @@ namespace Home\Controller; +use Base\Service\PromoteCompanyService; use Think\Controller; use Base\Service\PromoteService; @@ -393,8 +394,12 @@ class BaseController extends HomeController } } - $closePromoteLowest = [334, 370]; - if (in_array($topPromote['company_id'], $closePromoteLowest)) { + // 推广公司 + $promoteCompanyService = new PromoteCompanyService(); + $promoteCompanyService->getCompanies([$topPromote['company_id']]); + if ($promoteCompanyService['type'] == $promoteCompanyService::TYPE_CUSTOM) { +// $closePromoteLowest = [334, 370]; +// if (in_array($topPromote['company_id'], $closePromoteLowest)) { if ($topPromote['can_view_recharge'] == 1 && !in_array($promote['level'], [3, 4])) { return true; } else { From 8d156ffb644a84205349f6b6aecae26b7bc45394 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 4 Dec 2020 16:00:37 +0800 Subject: [PATCH 07/29] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 108 ++++++++++++++---- .../View/CompanyStatementPool/viewPuPool.html | 75 ++++++++---- 2 files changed, 142 insertions(+), 41 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 50f3f3fba..eec3970e8 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -218,7 +218,7 @@ class CompanyStatementPoolController extends ThinkController //获取基本信息 $infolist = M("company_statement_info","tab_")->field("*,'1' as st")->where("pool_id = '{$id}'")->select(); //获取母单 - $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type')->where("id={$id}")->find(); + $pool_info = M("company_statement_pool","tab_")->field('statement_num,create_lack_ids,verify_status,is_payment,withdraw_type,statement_begin_time,statement_end_time')->where("id={$id}")->find(); if(!empty($pool_info['create_lack_ids'])){ $l_ids = $pool_info['create_lack_ids']; $lack_info = M("company_lack_statement_info","tab_")->field("*,'0' as st")->where("id in ({$l_ids})")->select(); @@ -236,7 +236,7 @@ class CompanyStatementPoolController extends ThinkController //下游公司 $this->viewPcPool($infolist,$is_export); }else{ - $this->viewPuPool($infolist,$is_export); + $this->viewPuPool($infolist,$is_export,$pool_info); } } @@ -466,11 +466,12 @@ class CompanyStatementPoolController extends ThinkController } //个人汇总结算查看 - public function viewPuPool(&$infolist,$is_export){ + public function viewPuPool(&$infolist,$is_export,$pool_info){ $line = 1; $count = []; $week_line = 2; - + $pool_statement_begin_time = date('Y.m.d', $pool_info['statement_begin_time']); + $pool_statement_end_time = date('Y.m.d', $pool_info['statement_end_time']); //获取对接人 foreach($infolist as $k=>&$v){ $v['statement_info'] = json_decode($v['statement_info'],true); @@ -484,6 +485,7 @@ class CompanyStatementPoolController extends ThinkController $v['is_payment'] = 1; } } + $is_statement = $v['st'] == 1 ? true :false; $cline = $line+1; if($is_export){ $v['statement_money'] = "=ROUND("; @@ -495,17 +497,9 @@ class CompanyStatementPoolController extends ThinkController foreach($v['statement_info'] as $ke=>&$va){ $va['row'] = count($va['game_list']); $row += count($va['game_list']); - foreach($va['game_list'] as $key=>&$val){ $line ++; if($v['withdraw_type'] != 3) { -// if(!$val['ratio']&&!$val['increment_ratio']) { -// if(isset($val['ratio'])){ -// $val['increment_ratio'] = 0; -// }else{ -// $val['ratio'] = 0; -// } -// } if (!$val['increment_ratio']) { $val['increment_ratio'] = 0; } @@ -513,8 +507,25 @@ class CompanyStatementPoolController extends ThinkController if (!$val['ratio']) { $val['ratio'] = 0; } - + //上周数据合计 + if($val['statement_begin_time'] == $pool_statement_begin_time && $val['statement_end_time'] == $pool_statement_end_time){ + $count['pool_week_count'] += $val['pay_amount']; + if($is_export){ + $this->setWeekCount($line); + } + } + //本周未结算流水合计 + if(!$is_statement){ + $count['pool_lack_count'] += $val['pay_amount']; + $count['st_lack_count'] += $val['pay_amount']; + if($is_export){ + $this->setlackCount($line); + } + }else{ + $count['st_count'] += $val['pay_amount']; + } } + if($is_export){ if($v['withdraw_type'] != 3) { @@ -525,15 +536,11 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] .= "S{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; - -// $count['sum_money'] += $val['sum_money']; } } $count['week_money'] += $va['week_amount']; $count['sum_money'] += $va['week_amount']; } -// dump($count); - $v['row'] = $row; @@ -543,7 +550,6 @@ class CompanyStatementPoolController extends ThinkController if($is_export){ if($v['withdraw_type'] != 3) { -// $v['statement_money'] .="P{$cline}-Q{$cline},2)"; $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1) . ",2)"; } else { $v['statement_money'] = substr($v['statement_money'],0,strlen($v['statement_money'])-1).",2)"; @@ -551,18 +557,80 @@ class CompanyStatementPoolController extends ThinkController } } - if($is_export){ + if($pool_info["withdraw_type"] != 3){ + //上周数据合计 + $count["pool_week_count"] = $this->setWeekCount($line,true); + $count["pool_lack_count"] = $this->setlackCount($line,true); + //本周暂不结算合计 + $count["st_lack_count"] = '=ROUND(SUMIFS(T2:T'.$line.',Y2:Y'.$line.',"否"),2)'; + //本次应支付 + $count["st_count"] = '=ROUND(SUMIFS(T2:T'.$line.',Y2:Y'.$line.',"是"),2)'; + + } $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; $count["week_money"] = "=ROUND(SUM(S2:S".$line."),2)"; $count["sum_money"] = "=ROUND(SUM(T2:T".$line."),2)"; } -// die(); + // die(); $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); + + $this->assign("withdraw_type",$pool_info["withdraw_type"]); $this->display("CompanyStatementPool/viewPuPool"); } + //导出中上周结算数据计算 + protected function setWeekCount($line,$return = false) + { + global $pool_week_str,$pool_week_line; + if(empty($pool_week_str)){ + $pool_week_str = "="; + $pool_week_line = 0; + } + if($pool_week_str == "="){ + $pool_week_str .= "SUM(K{$line}:"; + }else{ + if($line - $pool_week_line > 1){ + //不连续 + $preline = $line-2; + $pool_week_str .= "K{$preline})+SUM(K{$line}:"; + } + } + $pool_week_line = $line; + if($return){ + $data = $pool_week_str."K{$line})"; + unset($pool_week_str,$pool_week_line); + return $data; + } + } + //本周不结算 + protected function setlackCount($line,$return = false) + { + global $pool_lack_str,$pool_lack_line; + if(empty($pool_lack_str)){ + $pool_lack_str = "="; + $pool_lack_line = 0; + } + if($pool_lack_str == "="){ + $pool_lack_str .= "SUM(K{$line}:"; + }else{ + if($line - $pool_lack_line > 1){ + //不连续 + $preline = $line-1; + $pool_lack_str .= "K{$preline})+SUM(K{$line}:"; + } + } + $pool_lack_line = $line; + if($return){ + $data = $pool_lack_str."K{$line})"; + unset($pool_lack_str,$pool_lack_line); + return $data; + } + } + + + //改变结构 public function changeDataStruct($statement_info = [],$is_export = 0,&$week_line = 1) { diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index 1f920a664..f742d7e28 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -308,28 +308,61 @@ - - 合计: - {$count.platform_amount} - - - - - - - - {$count.week_money} - {$count.sum_money} - - - - - - - + + + + 上周数据合计: + {$count.pool_week_count} + + 打款合计: + {$count.sum_money} + + + + + + + + 本周未结算流水合计: + {$count.pool_lack_count} + 本周暂不结算合计: + {$count.st_lack_count} + + + - - + + 本次应支付: + {$count.st_count} + + + + + 合计: + {$count.platform_amount} + + + + + + + + {$count.week_money} + {$count.sum_money} + + + + + + + + + + + + + + From 24f3489e65e30c6e2cad41838ab844e35b713ea2 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 4 Dec 2020 16:18:56 +0800 Subject: [PATCH 08/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/CompanyStatementPoolController.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index eec3970e8..4b5d21e4c 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -593,8 +593,7 @@ class CompanyStatementPoolController extends ThinkController }else{ if($line - $pool_week_line > 1){ //不连续 - $preline = $line-2; - $pool_week_str .= "K{$preline})+SUM(K{$line}:"; + $pool_week_str .= "K{$pool_week_line})+SUM(K{$line}:"; } } $pool_week_line = $line; @@ -617,8 +616,7 @@ class CompanyStatementPoolController extends ThinkController }else{ if($line - $pool_lack_line > 1){ //不连续 - $preline = $line-1; - $pool_lack_str .= "K{$preline})+SUM(K{$line}:"; + $pool_lack_str .= "K{$pool_lack_line})+SUM(K{$line}:"; } } $pool_lack_line = $line; From a741e8d37d827e5a74867200b5ff12010af8ada3 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 4 Dec 2020 17:12:14 +0800 Subject: [PATCH 09/29] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/SpendController.class.php | 5 +++++ Application/Admin/View/Spend/lists.html | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index 15416f9c9..48d02a272 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -153,7 +153,12 @@ class SpendController extends ThinkController ($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; $value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无'; $value['is_check_str'] = D(self::model_name)::IsCheckStr[$value['is_check']]; + //拆分游戏名称和设备类型 + $game_arr = explode("(",rtrim($value['game_name'],")")); + $value['game_name'] = $game_arr[0]; + $value['sdk_version_name'] = $game_arr[1]; } + $this->assign('showMarketAdmin', session('user_auth')['show_market_admin']); $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('isMarketAdmin', $isMarketAdmin); diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index 1ce4f4ede..33d066520 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -231,6 +231,7 @@ 支付时间 玩家账号 游戏名称 + 设备类型 所属推广员 @@ -293,6 +294,7 @@ ({$data.small_account}) {$data.game_name} + {$data.sdk_version_name} C('OFFICIEL_CHANNEL') From 8d1f77537a8e655f914adf43a1417dc80489f4e3 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 4 Dec 2020 17:26:12 +0800 Subject: [PATCH 10/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Spend/lists.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index 33d066520..687f29163 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -377,7 +377,7 @@ 汇总 - + 当页充值:{:null_to_0(array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount')))} From 2bc72f9ae2d6be4b4cf07b379ab7e11490575a22 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 4 Dec 2020 17:46:08 +0800 Subject: [PATCH 11/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E8=A1=A5=E7=82=B9=E4=B8=8D=E4=BF=AE=E6=94=B9=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/CompanyStatementPool/viewPuPool.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index f742d7e28..04a4ab5ed 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -308,7 +308,7 @@ - + 上周数据合计: From 4f1bebc3afdd04488f18364c5d025e54210f5348 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 7 Dec 2020 11:10:40 +0800 Subject: [PATCH 12/29] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/View/Finance/gameStatistics.html | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index c65db4ee3..8be9c3d0b 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -68,13 +68,34 @@ .layui-layer{ overflow: scroll; } + .main-place .question_content:before{ + right: 20px; + left: auto; + }
@@ -178,7 +199,7 @@
联运通知失败合计联运所有通知失败的合计金额
聚合万盟数据聚合平台万盟渠道支付成功且通知成功的金额
聚合万盟通知失败聚合平台万盟渠道通知失败的订单合计金额
-
聚合平台测试订单聚合平台测试订单
+
聚合平台测试订单聚合平台测试订单
聚合其他渠道数据聚合平台其他渠道(不含万盟)支付成功通知成功订单合计
聚合其他渠道通知失败订单聚合平台其他渠道(不含万盟)
通知失败的订单合计金额
操作 @@ -243,7 +264,7 @@ 'sdk_type'=>$_GET['sdk_type'], 'game_id'=>$data['game_id'], 'platform_type'=>2, - ])}">{$data.test_amount} + ])}" style="color:red;">{$data.test_amount} @@ -36,7 +38,7 @@ 合同合作方名称: - + @@ -133,7 +135,7 @@ - + + + + + + + + + + + + + + - @@ -411,6 +451,75 @@
*甲方公司类型: + + + *乙方公司类型: + + +
*甲方公司: + + + *乙方公司: + + +
*结算周期: @@ -186,7 +226,7 @@
是否有打款流程: - + @@ -210,7 +250,7 @@
结算生效期限: + -