master
chenzhi 4 years ago
parent 4fdb94c617
commit fa9dc518d5

@ -116,7 +116,6 @@ return array(
'OFFICIEL_CHANNEL'=>"江息网络", 'OFFICIEL_CHANNEL'=>"江息网络",
/*分库的表格*/ /*分库的表格*/
'SUBSITE_TABLE'=>[ 'SUBSITE_TABLE'=>[
"tab_spend",
"sys_auth_group", "sys_auth_group",
"tab_index_chart", "tab_index_chart",
"tab_deposit", "tab_deposit",

@ -1198,9 +1198,10 @@ class ExportController extends Controller
// $map = '1 = 2'; // $map = '1 = 2';
// $map1 = $map; // $map1 = $map;
// } // }
D("Spend")->addSubsiteWhere($map);
$map1 = $map; $map1 = $map;
$map1['pay_status'] = 1; $map1['pay_status'] = 1;
$total = SM('Spend','tab_')->where($map1)->sum('pay_amount'); $total = M('Spend','tab_')->where($map1)->sum('pay_amount');
// var_dump($total);die(); // var_dump($total);die();
$total=$total?$total:0; $total=$total?$total:0;
@ -1276,7 +1277,7 @@ class ExportController extends Controller
mb_convert_variables('GBK', 'UTF-8', $xlsCell); mb_convert_variables('GBK', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$accessNum = SM('Spend') $accessNum = M('Spend',"tab_")
->where($map) ->where($map)
->count(); ->count();
@ -1285,7 +1286,7 @@ class ExportController extends Controller
// var_dump($count);die(); // var_dump($count);die();
for($i = 1; $i <= $pages; $i++) { for($i = 1; $i <= $pages; $i++) {
$xlsData = SM('Spend') $xlsData = M('Spend',"tab_")
->field($fields) ->field($fields)
->where($map) ->where($map)
->limit(($i-1)*$perSize ,$perSize) ->limit(($i-1)*$perSize ,$perSize)

@ -80,11 +80,12 @@ class RechargeSumController extends ThinkController
} }
$map['pay_status'] = 1; $map['pay_status'] = 1;
$newAddPay = SM('spend',"tab_")->where(array_merge($map, array('_string' => '( small_id = 0 or small_id = user_id)')))->sum('pay_amount'); D("Spend")->addSubsiteWhere($map);
$newAddPay = M('spend',"tab_")->where(array_merge($map, array('_string' => '( small_id = 0 or small_id = user_id)')))->sum('pay_amount');
//当天累计付费 //当天累计付费
unset($map['user_id']); unset($map['user_id']);
$accumulated = SM('spend',"tab_")->where($map)->sum('pay_amount'); $accumulated = M('spend',"tab_")->where($map)->sum('pay_amount');
$data[$key]['date'] = date('Y-m-d', $start); $data[$key]['date'] = date('Y-m-d', $start);
$data[$key]['game_id'] = empty($_REQUEST['game_name']) ? "全部" : $_REQUEST['game_name']; $data[$key]['game_id'] = empty($_REQUEST['game_name']) ? "全部" : $_REQUEST['game_name'];

@ -35,9 +35,12 @@ define ( 'RUNTIME_PATH', './Runtime/' );
* 项目配置 * 项目配置
*/ */
$JBC_DB_CONFIG = include_once APP_PATH."/Common/Conf/env.php"; $JBC_DB_CONFIG = include_once APP_PATH."/Common/Conf/env.php";
if(!isset($JBC_DB_CONFIG['SUBSITE_DB_CONFIG']['WM_DB_CONFIG'])){
die("请先配置子站点连接参数");
}
$JBC_DB_CONFIG = $JBC_DB_CONFIG['SUBSITE_DB_CONFIG']['WM_DB_CONFIG']; $JBC_DB_CONFIG = $JBC_DB_CONFIG['SUBSITE_DB_CONFIG']['WM_DB_CONFIG'];
define ( 'IS_SUBSITE', true); define ( 'IS_SUBSITE', true);
define ( 'PARTNER_TYPE', 2); define ( 'PARTNER_TYPE', 1);
define ( 'SUBSITE_NAME', "wm"); define ( 'SUBSITE_NAME', "wm");
define ( 'SUBSITE_DB', $JBC_DB_CONFIG ); define ( 'SUBSITE_DB', $JBC_DB_CONFIG );
define ( 'SUBSITE_INDEX', "wm.php" );//子站点路口影响session define ( 'SUBSITE_INDEX', "wm.php" );//子站点路口影响session

Loading…
Cancel
Save