|
|
|
@ -924,14 +924,14 @@ public function auto_rrdae(){
|
|
|
|
|
$map['pay_game_status'] = 1;
|
|
|
|
|
$map['game_player_id'] = ['gt', 0];
|
|
|
|
|
$field = 'FROM_UNIXTIME(pay_time, "%Y-%m-%d") as day,game_id,server_id,game_player_id,sum(pay_amount) as recharge_cost,count(id) as recharge_count';
|
|
|
|
|
$spendCostData = M('spend', 'tab_')->field($field)
|
|
|
|
|
$spendData = M('spend', 'tab_')->field($field)
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('day,game_player_id,server_id,game_id')
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
if (!empty($spendCostData)) {
|
|
|
|
|
if (!empty($spendData)) {
|
|
|
|
|
$data = [];
|
|
|
|
|
foreach ($spendCostData as $list) {
|
|
|
|
|
foreach ($spendData as $list) {
|
|
|
|
|
$save['game_id'] = $list['game_id'];
|
|
|
|
|
$save['server_id'] = $list['server_id'];
|
|
|
|
|
$save['role_id'] = $list['game_player_id'];
|
|
|
|
|