diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 4c38f8749..7cc7e1fd0 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2021,5 +2021,18 @@ function caculateUpstream($game_id,$pay_amount) { } +//获取所有有关的公司 + +function getPromoteCompanyList() { + + $sql = "select id,company_name,1 as company_type from tab_promote_company"; + + $data = M()->table("({$sql}) as a")->select(); + + + return $data; + +} + ?> diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index a7d6214db..77dbd2e24 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -243,12 +243,18 @@ class AjaxController extends ThinkController{ public function getDownstreamData() { $withdraw_number = $_REQUEST['withdraw_number']; + if ($withdraw_number) { + $map['widthdraw_number'] = $withdraw_number; + } + if ($_REQUEST['company_id']) { + $map['company_id'] = $_REQUEST['company_id']; + } $data = M("withdraw","tab_") ->field("widthdraw_number,promote_account,tab_promote_company.id as company_id,company_name,tab_withdraw.settlement_type,mobile_phone,real_name,bank_card,account_openin,address,game_ratio,bank_account") ->join("left join tab_promote on tab_withdraw.promote_id=tab_promote.id") ->join("left join tab_promote_company on tab_promote.company_id=tab_promote_company.id") - ->where(['widthdraw_number'=>$withdraw_number]) + ->where($map) ->find(); if ($data['settlement_type']==1) { diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 7f6f4bde7..c3f8eada7 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -209,8 +209,8 @@ class MemberController extends ThinkController $field = array( "id"=>"账号ID","account"=>"玩家账号","promote_account"=>"所属推广员","balance"=>"账户平台币","recharge_total"=>"累计充值","gold_coin"=>"金币", - "alipay"=>"绑定支付宝","small_count"=>"小号","vip_level"=>"VIP等级","register_type"=>"注册方式","register_time"=>"注册时间","register_ip"=>"注册IP","login_time"=>"最后登录时间", - "device_number"=>"设备号","lock_status"=>"账号状态","check_status"=>"拉黑状态" + "small_count"=>"小号","vip_level"=>"VIP等级","register_type"=>"注册方式","register_time"=>"注册时间","register_ip"=>"注册IP","login_time"=>"最后登录时间", + "device_number"=>"设备号","lock_remark"=>"锁定备注","lock_status"=>"账号状态","check_status"=>"拉黑状态" ); data2csv($data,"玩家_玩家列表",$field); } diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 2b92db498..2f21630e9 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -22,9 +22,20 @@ class StatementMangementController extends ThinkController $map['create_time'] = ['LT', strtotime(I('time_end')) + 86399]; } - if ($_REQUEST['statement_type']) { - $map['statement_type'] = $_REQUEST['statement_type']; + if ($_REQUEST['statement_type']||$_REQUEST['statement_type']=='0') { + if($_REQUEST['statement_type']=='2') { + $map['second_party_info'] = ['like','%"order_type":1%']; + } else { + $map['statement_type'] = $_REQUEST['statement_type']; + if ($_REQUEST['statement_type']=='1') { + + $map['second_party_info'] = ['like','%"order_type":0%']; + + } + } +// dump($map['second_party_info']);die(); } +// var_dump($map);die(); if ($_REQUEST['company_id']) { $map['company_name'] = $_REQUEST['company_id']; @@ -34,12 +45,41 @@ class StatementMangementController extends ThinkController ->where($map) ->order("create_time Desc") ->select(); +// var_dump($data);die(); + foreach ($data as $key => $value) { + $data[$key]['order'] = json_decode($value['second_party_info'],true)['order_type']; + var_dump($data[$key]['order']); + } + + $sumData = M("statement","tab_") + ->field('sum(`statement_money`) as sum_money,statement_type') + ->where($map) + ->group('statement_type') + ->select(); + + $handleSumData = []; + foreach ($sumData as $key => $value) { + + $handleSumData[$value['statement_type']] = $value['sum_money']; + } + if (!$handleSumData[1]) { + $handleSumData[1] = 0; + } + + if (!$handleSumData[0]) { + $handleSumData[0] = 0; + } + + + $this->assign('sum',$handleSumData); +// dump($sumData);die(); + foreach($data as $key => $value) { $data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']); $data[$key]['statement_begin_time'] = date('Y-m-d H:i:s',$value['statement_begin_time']); - $data[$key]['statement_end_time'] = date('Y-m-d H:i:s',$value['statement_end_time']); + $data[$key]['statement_end_time'] = date('Y-m-d H:i:s',$value['statement_end_time']+86399); // $data[$key]['is_confirm'] = $data[$key]['is_confirm']?'确认':'未确认'; // $data[$key]['statement_type'] = $value['statement_type']?'公会对账单':'CP对账单'; @@ -67,6 +107,12 @@ class StatementMangementController extends ThinkController $statement_info = $_REQUEST['statement_info']; $sumData = $_REQUEST['sum_data']; + if ($second_party_info['settlement_type']=='补点订单') { + $second_party_info['order_type'] = 1; + } else { + $second_party_info['order_type'] = 0; + } + if (!$second_party_info||!$first_party_info||!$statement_info||!$statement_info) { $this->ajaxReturn(['code'=>0, 'msg'=>'数据错误' ]); } diff --git a/Application/Admin/View/StatementMangement/createDownstreamOrder.html b/Application/Admin/View/StatementMangement/createDownstreamOrder.html index 07b87d5a4..1e15b5239 100644 --- a/Application/Admin/View/StatementMangement/createDownstreamOrder.html +++ b/Application/Admin/View/StatementMangement/createDownstreamOrder.html @@ -5,14 +5,20 @@