Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
zyx 5 years ago
commit a850cfa048

@ -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();

@ -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()
{

@ -133,7 +133,9 @@
<th ><div class="tooltip">游戏现金流水<span class="tooltiptext"><span style="margin-left: -10px">第三方支付(微信,支付宝,快捷)</span></span></div></th>
<th ><div class="tooltip">平台币流水<span class="tooltiptext"><span style="margin-left: -10px">平台币所支付的流水</span></span></div></th>
<th ><div class="tooltip">平台币支出<span class="tooltiptext"><span style="margin-left: -10px">平台币游戏支付流水</span></span></div></th>
<th ><div class="tooltip">平台币收入<span class="tooltiptext"><span style="margin-left: -10px">平台币收入流水</span></span></div></th>
<th ><div class="tooltip">内充流水<span class="tooltiptext"><span style="margin-left: -10px">管理后台下发的所有平台币,绑定币流水(平台币订单-后台发放(玩家/推广员)),绑币订单-后台发放(玩家),平台币回收与绑币回收需要进行扣除</span></span></div></th>
@ -160,6 +162,7 @@
<td >{$data.count_date}</td>
<td >{$data.cash_count}</td>
<td >{$data.balance_coin_count}</td>
<td >{$data.balance_coin_deposit}</td>
<td >{$data.inside_cash_count}</td>
<td >{$data.all_count}</td>
<td >
@ -175,6 +178,7 @@
<td><span>总计</span></td>
<td ><span><if condition="$sumData.cash_count neq ''">{$sumData.cash_count}<else/>0</if></span></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_count}<else/>0</if></td>
<td><if condition="$sumData.balance_coin_count neq ''">{$sumData.balance_coin_deposit}<else/>0</if></td>
<td><if condition="$sumData.inside_cash_count neq ''">{$sumData.inside_cash_count}<else/>0</if></td>
<td><if condition="$sumData.all_count neq ''">{$sumData.all_count}<else/>0</if></td>
<td>

@ -248,4 +248,9 @@ CREATE TABLE `tab_spend_month_count` (
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='流水月份聚合表';
--------
ALTER TABLE `sys_file`
MODIFY COLUMN `name` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '原始文件名' AFTER `id`;
MODIFY COLUMN `name` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '原始文件名' AFTER `id`;
-- 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`;

Loading…
Cancel
Save