@ -997,6 +997,15 @@ class TimingController extends AdminController {
$belong_map = "((begin_time< ={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time< ={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time < ={$time_end}))";
}
if ($map['pay_time']) {
M("settleup_marketorder","tab_")
->where(['pay_time'=>$map['pay_time'],'is_settlement'=>0])
->delete();
} else {
M("settleup_marketorder","tab_")
->where('1=1')
->delete();
}
$data = M("auth_group")
->where(['title'=>['like','%市场%']])
@ -1041,6 +1050,10 @@ class TimingController extends AdminController {
}
if (!$spend_map['_string']) {
$spend_map['_string'] = "relation_game_id = 0";
}
$spend = M("spend","tab_")
->field("sum(pay_amount) as pay_amount,FROM_UNIXTIME(pay_time,'%Y-%m') pay_time,
substring_index(substring_index(tab_spend.game_name,'(',1),'(',-1) game_name,game_id,relation_game_id,tab_spend.sdk_version,
@ -1416,12 +1429,14 @@ class TimingController extends AdminController {
do {
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
$i++;
M("market_altogether","tab_")->where(['pay_time'=>$date])->delete();
$this->insertAllUserBonus($date);
} while ($date < date ( ' Y-m ' , strtotime ( date ( ' Y ' , time ( ) ) . ' - ' . ( date ( ' m ' , time ( ) ) -1 ) . ' -01 ' ) ) ) ;
// $map['pay_time'] = [];
unset($map['pay_time']);
} else{
M("market_altogether","tab_")->where(['pay_time'=>$pay_time])->delete();
$this->insertAllUserBonus($pay_time);
}