|
|
|
@ -281,19 +281,11 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$senddata[$v['promote_id']] = $v;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
if(!empty($senddata)){
|
|
|
|
|
if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){
|
|
|
|
|
$pmap['status']=1;
|
|
|
|
|
if($istimeselect){
|
|
|
|
|
$pmap['create_time'] = $istimeselect;
|
|
|
|
|
}
|
|
|
|
|
$admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find();
|
|
|
|
|
if($admininside['amount'] >0){
|
|
|
|
|
$senddata[0]['inside_cash_count']= $admininside['amount'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(array_key_exists(0,$senddata)){
|
|
|
|
|
unset($senddata[0]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = count($senddata);
|
|
|
|
|
if ($_REQUEST['data_order'] != '') {
|
|
|
|
|
$data_order = reset(explode(',', $_REQUEST['data_order']));
|
|
|
|
@ -366,6 +358,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$map['s.pay_time']=$istimeselect;
|
|
|
|
|
}
|
|
|
|
|
$map['s.pay_status']=1;
|
|
|
|
|
// dd($map);
|
|
|
|
|
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
|
|
|
|
|
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
|
|
|
|
|
SUM(CASE WHEN pay_way = -1 THEN pay_amount ELSE 0 END) as bind_coin_count,
|
|
|
|
@ -946,6 +939,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// dd($map);
|
|
|
|
|
$_POST['promote_level'] = $level;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|