优化统计逻辑

master
chenzhi 5 years ago
parent 8fd435a324
commit a9bc64a4b2

@ -543,7 +543,7 @@ class SpendCountSetController extends \Think\Controller
* @param 现金流水 cash_count 游戏中充值的现金 * @param 现金流水 cash_count 游戏中充值的现金
* @param 平台币流水 balance_coin_count 游戏中消耗的平台币 * @param 平台币流水 balance_coin_count 游戏中消耗的平台币
* @param 绑定币流水 bind_coin_count 游戏中绑定币的消耗 * @param 绑定币流水 bind_coin_count 游戏中绑定币的消耗
* @param 内充流水 inside_cash_count:(后台发放给玩家平台币-回收平台币 + (后台发放绑币给玩家 -回收的绑币) * @param 内充流水 inside_cash_count:(推广员的平台币发放-收回)+(后台发放给玩家平台币-回收平台币 + (后台发放绑币给玩家 -回收的绑币)
* @param 平台币充值 balance_coin_deposit * @param 平台币充值 balance_coin_deposit
* @return void * @return void
*/ */
@ -553,7 +553,7 @@ class SpendCountSetController extends \Think\Controller
$balance = $this->getBalanceUser(); $balance = $this->getBalanceUser();
$bind = $this->getBindUser(); $bind = $this->getBindUser();
$deposit = $this->getBalanceDeposit(); $deposit = $this->getBalanceDeposit();
$initdata["inside_cash_count"] = $balance-0+$bind; $initdata["inside_cash_count"] = $initdata["inside_cash_count"]-0+$balance-0+$bind;
$initdata["balance_coin_deposit"] = $deposit; $initdata["balance_coin_deposit"] = $deposit;
$initdata["all_count"] = $initdata["inside_cash_count"]-0+$initdata["cash_count"]-0+$deposit; $initdata["all_count"] = $initdata["inside_cash_count"]-0+$initdata["cash_count"]-0+$deposit;
$initdata["count_date"] = $this->date; $initdata["count_date"] = $this->date;
@ -568,7 +568,7 @@ class SpendCountSetController extends \Think\Controller
"count_date"=>$this->date, "count_date"=>$this->date,
"parent_id"=>0 "parent_id"=>0
); );
return M("spend_user_count","tab_")->field("sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(bind_coin_count) bind_coin_count")->where($tempmap)->find(); return M("spend_user_count","tab_")->field("sum(cash_count) cash_count,sum(balance_coin_count) balance_coin_count,sum(bind_coin_count) bind_coin_count,sum(inside_cash_count) inside_cash_count")->where($tempmap)->find();
} }
//获取平台币充值流水 //获取平台币充值流水
protected function getBalanceDeposit() protected function getBalanceDeposit()

Loading…
Cancel
Save