|
|
|
@ -1187,12 +1187,8 @@ class ExportController extends Controller
|
|
|
|
|
|
|
|
|
|
if (I('platform_type', 0) != 0) {
|
|
|
|
|
$sy = I('platform_type', 0) == 1 ? '=' : '<>';
|
|
|
|
|
$platformWhere = 'exists (select 1 from tab_game where id = tab_spend.game_id and unique_code ' . $sy . ' "")';
|
|
|
|
|
if (isset($map['_string']) && $map['_string']) {
|
|
|
|
|
$map['_string'] = $map['_string'] . ' and ' . $platformWhere;
|
|
|
|
|
} else {
|
|
|
|
|
$map['_string'] = $platformWhere;
|
|
|
|
|
}
|
|
|
|
|
$game_id = M("Game","tab_")->where('unique_code ' . $sy . ' ""')->getField("id",true);
|
|
|
|
|
$map['game_id'] = ['in',$game_id];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) {
|
|
|
|
@ -1204,7 +1200,7 @@ class ExportController extends Controller
|
|
|
|
|
// }
|
|
|
|
|
$map1 = $map;
|
|
|
|
|
$map1['pay_status'] = 1;
|
|
|
|
|
$total = M('Spend','tab_')->where($map1)->sum('pay_amount');
|
|
|
|
|
$total = SM('Spend','tab_')->where($map1)->sum('pay_amount');
|
|
|
|
|
// var_dump($total);die();
|
|
|
|
|
$total=$total?$total:0;
|
|
|
|
|
|
|
|
|
@ -1280,7 +1276,7 @@ class ExportController extends Controller
|
|
|
|
|
mb_convert_variables('GBK', 'UTF-8', $xlsCell);
|
|
|
|
|
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
|
|
|
|
|
|
|
|
|
|
$accessNum = D('Spend')
|
|
|
|
|
$accessNum = SM('Spend')
|
|
|
|
|
->where($map)
|
|
|
|
|
->count();
|
|
|
|
|
|
|
|
|
@ -1289,7 +1285,7 @@ class ExportController extends Controller
|
|
|
|
|
|
|
|
|
|
// var_dump($count);die();
|
|
|
|
|
for($i = 1; $i <= $pages; $i++) {
|
|
|
|
|
$xlsData = D('Spend')
|
|
|
|
|
$xlsData = SM('Spend')
|
|
|
|
|
->field($fields)
|
|
|
|
|
->where($map)
|
|
|
|
|
->limit(($i-1)*$perSize ,$perSize)
|
|
|
|
|