->join("left join tab_promote promote on tab_spend.promote_id=promote.id")
@ -974,7 +974,7 @@ class TimingController extends AdminController {
public function getSpendData($begintime = 0,$endtime = 0,$company_id=0,$relation_game_id=0,$admin_id=0,$promote_id=0) {
$map['tab_spend.pay_status'] = 1;
$map['pay_way'] = ['egt',0];
D("Spend")->addSubsiteWhere($map,"tab_spend");
$spend = M("spend","tab_")
->field("sum(pay_amount) pay_amount,
CASE WHEN substring_index(substring_index(`chain`,'/',2),'/',-1) !='' THEN substring_index(substring_index(`chain`,'/',2),'/',-1) ELSE promote_id END promote_id,game.relation_game_id,company_id")
@ -1030,7 +1030,7 @@ class TimingController extends AdminController {
}
if ($map['pay_time']) {
M("settleup_marketorder","tab_")
SM("settleup_marketorder","tab_")
->where(['pay_time'=>['in',$month_time]])
->delete();
}
@ -1086,7 +1086,7 @@ class TimingController extends AdminController {