diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 828eff9a7..1642dc963 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -621,7 +621,7 @@ function getPromoteCompany() ->field('id,company_name') ->where("status = 1") ->select(); - array_unshift($list,array("id"=>0,"company_name"=>"万盟天下科技"));//默认0 + array_unshift($list,array("id"=>0,"company_name"=>C(DEFAULT_COMPANY)));//默认0 return $list; } diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index 1ad717e8e..b811c5edb 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -110,5 +110,6 @@ return array( 'TMPL_ACTION_ERROR' => MODULE_PATH.'View/Public/error.html', // 默认错误跳转对应的模板文件 'TMPL_ACTION_SUCCESS' => MODULE_PATH.'View/Public/success.html', // 默认成功跳转对应的模板文件 'TMPL_EXCEPTION_FILE' => MODULE_PATH.'View/Public/exception.html',// 异常页面的模板文件 - + /*默认公司名称*/ + 'DEFAULT_COMPANY'=>"海南万盟天下科技有限公司", ); \ No newline at end of file diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 2e7771580..cb9d01bc4 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2371,6 +2371,88 @@ class ExportController extends Controller // dd($xlsData); break; + case 27: + $xlsCell = array( + array('server_type', '服务器类型'), + array('order_type', '订单类型'), + array('order_no', '支付订单号'), + array('cp_order_no', 'cp订单号'), + array('user_account', '测试账号'), + array('pay_time', '充值时间'), + array('game_name', '游戏名称'), + array('order_amount', '订单金额'), + array('pay_amount', '实付金额'), + array('pay_way', '充值方式'), + array('add_time', '录入时间'), + ); + + $params = I('get.'); + // if(isset($params['timestart']) && isset($params['timeend'])) { + // $startTime = strtotime($params['timestart']); + // $endTime = strtotime($params['timeend']) + 86399; + // $map['tab_test_order.pay_time'] = array('BETWEEN', [$startTime, $endTime]); + // } + + if(isset($params['server_type'])) { + $map['tab_test_order.server_type'] = $params['server_type']; + } + + if(isset($params['order_type'])) { + $map['tab_test_order.order_type'] = $params['order_type']; + } + + if(isset($params['order_no'])) { + $map['tab_test_order.order_no'] = $params['order_no']; + } + + if(isset($params['user_account'])) { + $map['tab_test_order.user_account'] = $params['user_account']; + } + + if(isset($params['pay_way'])) { + $map['tab_test_order.pay_way'] = $params['pay_way']; + } + + if(!empty($params['timestart']) && !empty($params['timeend'])){ + $timestart = strtotime($params['timestart']); + $timeend = strtotime($params['timeend'])+86399; + $map['tab_test_order.pay_time'] = array("between",array($timestart,$timeend)); + }else if(!empty($params['timestart']) && empty($params['timeend'])) { + $timestart = strtotime($params['timestart']); + $map['tab_test_order.pay_time'] = array("EGT",$timestart); + }else if (!empty($params['timeend']) && empty($params['timestart'])) { + $timeend = strtotime($params['timeend'])+86399; + $map['tab_test_order.pay_time'] = array("ELT",$timeend); + } + + + $orderData = M('test_order', 'tab_')->where($map)->page($page,$row)->order('add_time desc')->select(); + $sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount,count(1) as count')->find(); + $sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find(); + $xlsData = []; + foreach($orderData as $k => $v) { + if ($v['server_type'] == 1) { + $order_list['server_type'] = '测试内网'; + }else { + $order_list['server_type'] = '测试外网'; + } + $order_list['order_type'] = get_order_type($v['order_type']); + $order_list['order_no'] = $v['order_no']; + $order_list['cp_order_no'] = $v['cp_order_no']; + $order_list['user_account'] = $v['user_account']; + $order_list['pay_time'] = date('Y-m-d H:i:s', $v['pay_time']); + $order_list['game_name'] = $v['game_name']; + $order_list['order_amount'] = $v['order_amount']; + $order_list['pay_amount'] = $v['pay_amount']; + $order_list['pay_way'] = get_pay_way($v['pay_way']); + $order_list['add_time'] = date('Y-m-d H:i:s', $v['add_time']); + $xlsData[] = $order_list; + } + $sumData = [['server_type'=>'总计', + 'order_amount'=>$sum_order_amount['sum_order_amount'], + 'pay_amount'=>$sum_pay_amount['sum_order_amount']]]; + $xlsData = array_merge($xlsData,$sumData); + break; default: $xlsName = $xlsCell = $xlsData = []; diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 0dafcc27c..a2bbb9684 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -2,10 +2,11 @@ namespace Admin\Controller; class FinancePromoteController extends AdminController { - public $COMPANY_NAME = "万盟天下科技"; + public $COMPANY_NAME = ""; public function _initialize() { parent::_initialize(); + $this->COMPANY_NAME =C(DEFAULT_COMPANY); // echo "
";
     }
     public function index($p=1)
diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php
index 391d2101e..1e26a082b 100644
--- a/Application/Admin/Controller/QueryController.class.php
+++ b/Application/Admin/Controller/QueryController.class.php
@@ -1891,7 +1891,7 @@ class QueryController extends ThinkController
             $records = [];
             if (!empty($promotes)) {
                 foreach ($promotes as $promote) {
-                    $promote['company_name'] = ($companyList[$promote['company_id']] ? $companyList[$promote['company_id']] : ($promote['company_id'] == 0 ? '万盟天下科技' : '未知'));
+                    $promote['company_name'] = ($companyList[$promote['company_id']] ? $companyList[$promote['company_id']] : ($promote['company_id'] == 0 ? C(DEFAULT_COMPANY) : '未知'));
                     if ($promote['auto_review_withdraw_status'] == 0) {
                         $className = 'auto-closed';
                         $text = '关闭';
diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php
index 357521b3c..bd8fd468f 100644
--- a/Application/Admin/Controller/StatementMangementController.class.php
+++ b/Application/Admin/Controller/StatementMangementController.class.php
@@ -43,9 +43,9 @@ class StatementMangementController extends ThinkController
 
         if ($_REQUEST['company_id']) {
             $map['company_name'] = $_REQUEST['company_id'];
-            if ($_REQUEST['company_id']=='万盟天下科技') {
-                $map['company_name'] = '海南万盟天下科技有限公司';
-            }
+            // if ($_REQUEST['company_id']=='万盟天下科技') {
+            //     $map['company_name'] = '海南万盟天下科技有限公司';
+            // }
         }
 
         $data = M("statement","tab_")
diff --git a/Application/Admin/View/Promote/add.html b/Application/Admin/View/Promote/add.html
index dc05f83fe..2ede9818d 100644
--- a/Application/Admin/View/Promote/add.html
+++ b/Application/Admin/View/Promote/add.html
@@ -44,7 +44,7 @@