From c8da11a12e1fb30872c979fe133b8a70112bc03b Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Mon, 4 Nov 2019 10:24:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E5=B8=81=E6=B5=81=E6=B0=B4=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/SpendCountSetController.class.php | 15 ++++++++++++++- Data/update.sql | 7 ++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/SpendCountSetController.class.php b/Application/Admin/Controller/SpendCountSetController.class.php index 881c9f03c..67cb5b0ad 100644 --- a/Application/Admin/Controller/SpendCountSetController.class.php +++ b/Application/Admin/Controller/SpendCountSetController.class.php @@ -588,8 +588,10 @@ class SpendCountSetController extends \Think\Controller $initdata = $this->getMonthInit(); $balance = $this->getBalanceUser(); $bind = $this->getBindUser(); + $deposit = $this->getBalanceDeposit(); $initdata["inside_cash_count"] = $initdata["inside_cash_count"]-0+$balance-0+$bind; - $initdata["all_count"] = $initdata["inside_cash_count"]-0+$initdata["balance_coin_count"]-0+$initdata["cash_count"]; + $initdata["balance_coin_deposit"] = $deposit; + $initdata["all_count"] = $initdata["inside_cash_count"]-0+$initdata["balance_coin_count"]-0+$initdata["cash_count"]-0+$deposit; $initdata["count_date"] = $this->date; $initdata["create_time"] = $this->nowdata; M("spend_month_count","tab_")->add($initdata); @@ -604,6 +606,17 @@ class SpendCountSetController extends \Think\Controller ); return M("spend_user_count","tab_")->field("sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(inside_cash_count) inside_cash_count")->where($tempmap)->find(); } + //获取平台币充值流水 + protected function getBalanceDeposit() + { + $map = array( + "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), + "pay_status"=>1 + ); + $deposit = M("deposit","tab_")->field("SUM(pay_amount) pay_amount")->where($map)->find()['pay_amount']; + $deposit || $deposit=0; + return $deposit; + } //设置 后台发放平台币给玩家 及 回收玩家 的最终值 protected function getBalanceUser() { diff --git a/Data/update.sql b/Data/update.sql index 998966f5a..97991b298 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -245,4 +245,9 @@ CREATE TABLE `tab_spend_month_count` ( `create_time` int(11) DEFAULT NULL COMMENT '添加时间', PRIMARY KEY (`id`) USING BTREE, KEY `count_date` (`count_date`) USING BTREE -) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水月份聚合表'; \ No newline at end of file +) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水月份聚合表'; + +-- 2019-11-04 chenzhi +ALTER TABLE `tab_spend_month_count` +MODIFY COLUMN `balance_coin_count` decimal(10,2) NULL DEFAULT 0.00 COMMENT '平台币游戏支付流水' AFTER `cash_count`, +ADD COLUMN `balance_coin_deposit` decimal(10,2) NULL DEFAULT 0.00 COMMENT '平台币充值流水' AFTER `balance_coin_count`; From 5a7432ef40465e398173289dc7de41c6bd1b5796 Mon Sep 17 00:00:00 2001 From: zyx Date: Mon, 4 Nov 2019 10:34:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9C=88=E7=BB=93=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B9=B3=E5=8F=B0=E6=AF=94=E6=94=B6=E5=85=A5?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=B0=86=E5=B9=B3=E5=8F=B0=E5=B8=81?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E6=94=B9=E4=B8=BA=E5=B9=B3=E5=8F=B0=E5=B8=81?= =?UTF-8?q?=E6=94=AF=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 4 ++-- Application/Admin/View/Finance/index.html | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 0aaf253ed..e0ca919c0 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -85,7 +85,7 @@ class FinanceController extends ThinkController $order = "id DESC"; $data = M('spend_month_count','tab_') - ->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date") + ->field("cash_count,balance_coin_count,inside_cash_count,all_count,count_date,balance_coin_deposit") ->where($map) ->page($page,$row) ->order($order) @@ -98,7 +98,7 @@ class FinanceController extends ThinkController ->select(); $sumData = M('spend_month_count','tab_') - ->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date") + ->field("sum(cash_count) as cash_count,sum(balance_coin_count) as balance_coin_count,sum(inside_cash_count) as inside_cash_count,sum(all_count) as all_count,count_date,sum(balance_coin_deposit) as balance_coin_deposit") ->where($map) ->order($order) ->find(); diff --git a/Application/Admin/View/Finance/index.html b/Application/Admin/View/Finance/index.html index fbc07a9c7..cdafedc2c 100644 --- a/Application/Admin/View/Finance/index.html +++ b/Application/Admin/View/Finance/index.html @@ -133,7 +133,9 @@
游戏现金流水第三方支付(微信,支付宝,快捷)
-
平台币流水平台币所支付的流水
+
平台币支出平台币游戏支付流水
+ +
平台币收入平台币收入流水
内充流水管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员)),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除
@@ -160,6 +162,7 @@ {$data.count_date} {$data.cash_count} {$data.balance_coin_count} + {$data.balance_coin_deposit} {$data.inside_cash_count} {$data.all_count} @@ -175,6 +178,7 @@ 总计 {$sumData.cash_count}0 {$sumData.balance_coin_count}0 + {$sumData.balance_coin_deposit}0 {$sumData.inside_cash_count}0 {$sumData.all_count}0