From 65461ff200eafd024bc1d03043bd0a8536f25fe0 Mon Sep 17 00:00:00 2001 From: jbRotk <2436953959@qq.com> Date: Mon, 3 Feb 2020 12:17:56 +0800 Subject: [PATCH 1/3] c --- .../Controller/ExportController.class.php | 9 ++++++++ .../Controller/FinanceController.class.php | 6 ++++++ .../Controller/PromoteController.class.php | 21 ++++++++++++++++++- Application/Admin/Model/SpendModel.class.php | 2 +- .../Admin/View/Finance/gameStatistics.html | 14 ++++++++++++- Application/Admin/View/Promote/belong.html | 20 ++++++++++++++++++ Application/Admin/View/Promote/lists.html | 12 ++++++++++- 7 files changed, 80 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 118624446..6a3849e40 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -5887,6 +5887,10 @@ class ExportController extends Controller if (strlen(I('company_belong'))) { $map['company_belong'] = I("company_belong"); } + + if (!is_null(I('admin_uid', null))) { + $map['admin_id'] = I('admin_uid'); + } //为数据权限添加 setPowerPromoteIds($map, 'tab_promote.id'); @@ -7114,6 +7118,7 @@ class ExportController extends Controller $xlsCell = array( array('game_name','游戏'), + array('game_type_name','游戏类型'), array('partner_name','合作公司'), array('cash_count','游戏现金金额'), array('balance_coin_count','平台币直充支出'), @@ -7145,6 +7150,10 @@ class ExportController extends Controller $map['_string'] .= " s.pay_time < {$timeend}"; } + if (!empty(I('game_type_id'))) { + $map['g.game_type_id'] = I('game_type_id'); + } + $xlsData = D("spend")->gameStatistics($map); foreach ($xlsData as $key => $value) { $xlsData[$key]['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count']; diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index f3a6da5fb..e72fdb907 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -725,6 +725,10 @@ class FinanceController extends ThinkController } $map['_string'] .= " s.pay_time < {$timeend}"; } + + if (!empty(I('game_type_id'))) { + $map['g.game_type_id'] = I('game_type_id'); + } $startTime = time(); //游戏统计列表 $data = D("spend")->gameStatistics($map, $row, $p); @@ -749,6 +753,8 @@ class FinanceController extends ThinkController $sumInside = $totalData['inside_cash_count']; $sumAll = $sumCash + $sumBalance + $sumInside; + $game_types = M("game_type", 'tab_')->field('id, type_name')->select(); + $this->assign('game_types', $game_types); $this->assign('sumCash', $sumCash); $this->assign('sumBalance', $sumBalance); $this->assign('sumInside', $sumInside); diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 223d6d0fc..08cc2bd37 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -99,6 +99,11 @@ class PromoteController extends ThinkController if (strlen(I('company_belong'))) { $map['company_belong'] = I("company_belong"); } + + if (!is_null(I('admin_uid', null))) { + $map['admin_id'] = I('admin_uid'); + } + $this->m_title = '推广员列表'; $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); if (isset($_REQUEST['row'])) { @@ -176,6 +181,8 @@ class PromoteController extends ThinkController if ($page) { $this->assign('_page', $page); } + $admins = M('member')->field('uid,nickname')->select(); + $this->assign('admins', $admins); $this->assign('list_data', $list_data); $this->display(); } @@ -1216,6 +1223,13 @@ class PromoteController extends ThinkController $map['pb.can_view_recharge'] = I('can_view_recharge'); } + if (!is_null(I('company_id', null))) { + $map['p.company_id'] = I('company_id'); + } + + if (!is_null(I('admin_id', null))) { + $map['p.admin_id'] = I('admin_id'); + } $this->m_title = '推广公会归属管理'; $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/belong','status'=>1])->find()); if (isset($_REQUEST['row'])) { @@ -1229,8 +1243,9 @@ class PromoteController extends ThinkController $model = M('promote_belong', 'tab_'); $list_data = $model->alias('pb') ->join('left join tab_promote as p on p.id=pb.promote_id') + ->join('left join tab_promote_company as pc on pc.id = p.company_id') ->where($map) - ->field('p.*,pb.*') + ->field('p.*,pb.*, pc.company_name') ->page($p, $row) ->order('verify_status asc,applicant_time asc') ->select(); @@ -1241,8 +1256,12 @@ class PromoteController extends ThinkController if ($page) { $this->assign('_page', $page); } + $companys = M('promote_company', 'tab_')->field('id, company_name')->select(); + $admins = M('member')->field('uid,nickname')->select(); $this->assign('is_admin', is_administrator()); $this->assign('list_data', $list_data); + $this->assign('companys', $companys); + $this->assign('admins', $admins); $this->display(); } diff --git a/Application/Admin/Model/SpendModel.class.php b/Application/Admin/Model/SpendModel.class.php index f7177406b..9242d01ec 100644 --- a/Application/Admin/Model/SpendModel.class.php +++ b/Application/Admin/Model/SpendModel.class.php @@ -841,7 +841,7 @@ class SpendModel extends Model public function gameStatistics($map, $row = 0, $page = 1) { $query = $this->alias("s") - ->field("s.game_id,s.game_name,p.partner as partner_name, + ->field("s.game_id,s.game_name,p.partner as partner_name, g.game_type_name, SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count, SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count, SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as inside_cash_count") diff --git a/Application/Admin/View/Finance/gameStatistics.html b/Application/Admin/View/Finance/gameStatistics.html index 4e241b0b6..b486d0ee5 100644 --- a/Application/Admin/View/Finance/gameStatistics.html +++ b/Application/Admin/View/Finance/gameStatistics.html @@ -107,6 +107,15 @@ +