diff --git a/Application/Base/Repository/SpendRepository.class.php b/Application/Base/Repository/SpendRepository.class.php
index f29d14dd2..4d0d889ff 100644
--- a/Application/Base/Repository/SpendRepository.class.php
+++ b/Application/Base/Repository/SpendRepository.class.php
@@ -65,8 +65,8 @@ class SpendRepository {
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
- $field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day,sum(pay_amount) as amount';
- $items = M('spend', 'tab_')->field($field)->where($map)->group('FROM_UNIXTIME(day, "%Y-%m-%d")')->select();
+ $field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day, sum(pay_amount) as amount';
+ $items = M('spend', 'tab_')->field($field)->where($map)->group('day')->select();
return $this->assembleDayRecords($items, $dayList, 'amount');
}
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index 5609b8fee..77006292d 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -711,8 +711,8 @@ class QueryController extends BaseController
'registerCount' => $registerCountList[$day],
'payRate' => $loginCountList[$day] == 0 ? '--' : round($payUserCountList[$day]/$loginCountList[$day]*100, 2) . '%',
'ratentionOneDay' => '--',
- 'arpu' => $loginCountList[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$loginCountList[$day], 2), 2),
- 'arppu' => $payUserCount[$day] == 0 ? '0.00' : number_format(round($payAmount[$day]/$payUserCount[$day], 2), 2),
+ 'arpu' => $loginCountList[$day] == 0 ? '0.00' : number_format(round($payAmountList[$day]/$loginCountList[$day], 2), 2),
+ 'arppu' => $payUserCountList[$day] == 0 ? '0.00' : number_format(round($payAmountList[$day]/$payUserCountList[$day], 2), 2),
];
}
} else {
@@ -1852,7 +1852,7 @@ class QueryController extends BaseController
$promotes = $this->getNormalPromotes($promote);
}
- $map = $spendMap = ['promote_id' => ['in' => $ids]];
+ $map = $spendMap = ['promote_id' => ['in', $ids]];
if ($gameId != 0) {
$map['game_id'] = $gameId;
}
@@ -1966,7 +1966,7 @@ class QueryController extends BaseController
public function getGameServers()
{
$gameId = I('game_id', 0);
- $servers = M('server', 'tab_')->field(['id', 'server_name'])->where(['game_id' => $gameId])->select();
+ $servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => $gameId])->select();
$this->ajaxReturn([
'status' => 1,
'msg' => '成功',
diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html
index fa5245fdf..b58234f1d 100644
--- a/Application/Home/View/default/Query/achievement.html
+++ b/Application/Home/View/default/Query/achievement.html
@@ -178,7 +178,7 @@ $(function() {
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
- options += ''
+ options += ''
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html
index 93df3fe1d..ea0877436 100644
--- a/Application/Home/View/default/Query/userRecharges.html
+++ b/Application/Home/View/default/Query/userRecharges.html
@@ -166,7 +166,7 @@ $(function(){
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
- options += ''
+ options += ''
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
diff --git a/Application/Home/View/default/Query/userRoles.html b/Application/Home/View/default/Query/userRoles.html
index af863eb29..e6bd7a53f 100644
--- a/Application/Home/View/default/Query/userRoles.html
+++ b/Application/Home/View/default/Query/userRoles.html
@@ -170,7 +170,7 @@ $(function() {
if (defaultServerId > 0 && server.id==defaultServerId) {
selected = 'selected'
}
- options += ''
+ options += ''
}
$('#server-select').html(options)
$("#server-select").val(defaultServerId).trigger("change")
diff --git a/Data/update.sql b/Data/update.sql
index 4f7597c27..76738c49c 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -137,3 +137,4 @@ CREATE TABLE `tab_test_resource` (
alter table tab_user_play_info add column `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '角色创建时间';
alter table tab_user_play_info add column `create_ip` varchar(16) NOT NULL DEFAULT '' COMMENT '角色创建IP';
alter table tab_user_play_info add column `create_device_number` varchar(50) NOT NULL DEFAULT '' COMMENT '角色创建设备号';
+alter table tab_server add column `server_id` varchar(50) not NULL default '' COMMENT '对接区服id';