|
|
|
@ -80,14 +80,14 @@ class PayChannelIntentionController extends AdminController
|
|
|
|
|
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
|
|
|
|
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
|
|
|
|
count(if(pay_status=2,pay_amount,null)) nothing_invest_count,create_time')
|
|
|
|
|
// ->where($map)
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('a.pay_ways,a.user_account,a.pay_status')
|
|
|
|
|
->select(false);
|
|
|
|
|
|
|
|
|
|
// dump($data);die();
|
|
|
|
|
$count = M()->table('('.$data.') as a')
|
|
|
|
|
->field('pay_ways,sum(fail_invest_amount) fail_invest_amount')
|
|
|
|
|
->where($map)
|
|
|
|
|
// ->where($map)
|
|
|
|
|
->group('a.pay_ways')
|
|
|
|
|
->select(false);
|
|
|
|
|
// dump($count);die();
|
|
|
|
@ -227,7 +227,7 @@ class PayChannelIntentionController extends AdminController
|
|
|
|
|
count(if(pay_status=0,pay_amount,null)) fail_invest_count,
|
|
|
|
|
count(if(pay_status=1,pay_amount,null)) success_invest_count,
|
|
|
|
|
count(if(pay_status=2,pay_amount,null)) nothing_invest_count,create_time')
|
|
|
|
|
// ->where($map)
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('a.pay_ways,a.user_account,a.pay_status')
|
|
|
|
|
->select(false);
|
|
|
|
|
|
|
|
|
@ -266,7 +266,7 @@ class PayChannelIntentionController extends AdminController
|
|
|
|
|
count(if(pay_status=2,nothing_invest_count,NULL)) nothing_invest_count,
|
|
|
|
|
sum(nothing_invest_amount) nothing_invest_amount')
|
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
|
->where($map)
|
|
|
|
|
// ->where($map)
|
|
|
|
|
->group('a.pay_ways')
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
@ -368,14 +368,21 @@ class PayChannelIntentionController extends AdminController
|
|
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_ways']) {
|
|
|
|
|
$map['pay_ways'] = ['like',"%{$_REQUEST['pay_ways']}"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_way']) {
|
|
|
|
|
$map['pay_ways'] = $_REQUEST['pay_way'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['pay_ways']) {
|
|
|
|
|
$map['pay_ways'] = ['like',"%{$_REQUEST['pay_ways']}"];
|
|
|
|
|
$pay_type = end(explode(',',$_REQUEST['pay_way']));
|
|
|
|
|
if (!$_REQUEST['pay_way']&&$_REQUEST['pay_ways']) {
|
|
|
|
|
$pay_type = $_REQUEST['pay_ways'];
|
|
|
|
|
}
|
|
|
|
|
// var_dump($map);die();
|
|
|
|
|
|
|
|
|
|
$this->assign('pay_type',$pay_type);
|
|
|
|
|
// var_dump($pay_type);die();
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['user_account']) {
|
|
|
|
|
$map['user_account'] = $_REQUEST['user_account'];
|
|
|
|
|