From e86f4c47629173e6aa64fb7e7f6ea3b64436e794 Mon Sep 17 00:00:00 2001 From: tping Date: Fri, 30 Oct 2020 16:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B0=E8=B4=A6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DownloadController.class.php | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 2f260fbc7..c1ed7f658 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1395,11 +1395,28 @@ class DownloadController extends BaseController { * 充值明细添加下载 * @author sunke */ - public function recharge_data_export() { + public function recharge_data_export() { + // 支付到账时间 + $payedBegTime = I("payed_begtime", ''); + if ($payedBegTime) { + $payedBegTime = strtotime($payedBegTime); + $payedEndTime = I("payed_endtime", ''); + if ($payedEndTime) { + $payedEndTime = strtotime($payedEndTime) + 86400; + } + } + if ($payedBegTime && !$payedEndTime) { + $this->error('到账时间有误,请检查。'); + } + if (($payedEndTime - $payedBegTime) > 31 * 24 * 3600) { + $this->error('到账时间范围不能超过31天'); + } + + // 下单时间 $beginTime = strtotime(I('begtime') . ' 00:00:00'); $endtime = strtotime(I('endtime') . ' 23:59:59'); if (($endtime - $beginTime) > 31 * 24 * 3600) { - $this->error('时间范围不能超过31天'); + $this->error('下单时间范围不能超过31天'); } $map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); @@ -1461,6 +1478,10 @@ class DownloadController extends BaseController { $map['tab_spend.spend_time'] = ['between',[$initBegTime,$initEndTime]]; } + if ($payedBegTime) { + $map['tab_spend.payed_time'] = ['between', [$payedBegTime, $payedEndTime - 1]]; + } + empty(I('relation_game_id')) || $map['tab_game.relation_game_id'] = I('relation_game_id'); empty(I('sdk_version')) || $map['tab_game.sdk_version'] = I('sdk_version'); empty(I('server_id')) || $map['tab_spend.server_id'] = I('server_id'); @@ -4420,7 +4441,8 @@ public function iosDetailExcelInfo($id,$map) { '部门长', '组长', '推广员', - '付款时间', + '下单时间', + '到账时间', ); $records = recordPromoteLogs('数据管理','充值明细导出'); $model = M('spend','tab_'); @@ -4525,7 +4547,8 @@ public function iosDetailExcelInfo($id,$map) { $csvData["p_p_proinfo"] = $value1["p_p_proinfo"]; $csvData["p_proinfo"] = $value1["p_proinfo"]; $csvData["proinfo"] = $value1["proinfo"]; - $csvData["pay_time"] = $value1["pay_time"]; + $csvData["spend_time"] = $value1["spend_time"]; + $csvData["payed_time"] = $value1["pay_time"]; mb_convert_variables('GBK', 'UTF-8', $csvData); fputcsv($fp, $csvData); $xlsData[] = $csvData; @@ -4554,7 +4577,8 @@ public function iosDetailExcelInfo($id,$map) { $csvData1["p_p_proinfo"] = "--"; $csvData1["p_proinfo"] = "--"; $csvData1["proinfo"] = "--"; - $csvData1["pay_time"] = "--"; + $csvData1["spend_time"] = "--"; + $csvData1["payed_time"] = "--"; mb_convert_variables('GBK', 'UTF-8', $csvData1); fputcsv($fp, $csvData1); $xlsData[] = $csvData1;