|
|
@ -588,8 +588,10 @@ class SpendCountSetController extends \Think\Controller
|
|
|
|
$initdata = $this->getMonthInit();
|
|
|
|
$initdata = $this->getMonthInit();
|
|
|
|
$balance = $this->getBalanceUser();
|
|
|
|
$balance = $this->getBalanceUser();
|
|
|
|
$bind = $this->getBindUser();
|
|
|
|
$bind = $this->getBindUser();
|
|
|
|
|
|
|
|
$deposit = $this->getBalanceDeposit();
|
|
|
|
$initdata["inside_cash_count"] = $initdata["inside_cash_count"]-0+$balance-0+$bind;
|
|
|
|
$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["count_date"] = $this->date;
|
|
|
|
$initdata["create_time"] = $this->nowdata;
|
|
|
|
$initdata["create_time"] = $this->nowdata;
|
|
|
|
M("spend_month_count","tab_")->add($initdata);
|
|
|
|
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();
|
|
|
|
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()
|
|
|
|
protected function getBalanceUser()
|
|
|
|
{
|
|
|
|
{
|
|
|
|