修改bug

master
ELF 5 years ago
parent 189eec168e
commit 5ff559cf11

@ -54,6 +54,9 @@ class SpendRepository {
$conditions['promote_id'] = ['in', $ids];
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
if (isset($params['server_id'])) {
$conditions['server_id'] = $serverId;
}
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
return $conditions;
}

@ -1817,7 +1817,7 @@ class QueryController extends BaseController
$roleLevelBegin = intval(I('role_level_begin', 0));
$roleLevelEnd = intval(I('role_level_end', 0));
$headmanPromoteId = I('headman_promote_id', 0);
$playTime = I('play_time', '');
$createTime = I('create_time', '');
$promote = $this->getLoginPromote();
$map = [
@ -1858,7 +1858,7 @@ class QueryController extends BaseController
$map['game_id'] = $gameId;
}
if ($serverId != 0) {
$map['serverId'] = $serverId;
$map['server_id'] = $serverId;
}
if ($roleName != '') {
$map['role_name'] = ['like', '%' . $roleName . '%'];
@ -1876,18 +1876,18 @@ class QueryController extends BaseController
} elseif ($roleLevelEnd != 0 && $roleLevelBegin != 0) {
$map['role_level'] = ['between', [$roleLevelBegin, $roleLevelEnd]];
}
if ($playTime != '') {
$playTimeRow = explode(' 至 ', $playTime);
$playTimeBegin = 0;
$playTimeEnd = 0;
if (count($playTimeRow) == 2) {
$playTimeBegin = strtotime($playTimeRow[0] . ' 00:00:00');
$playTimeEnd = strtotime($playTimeRow[1] . ' 23:59:59');
if ($createTime != '') {
$createTimeRow = explode(' 至 ', $createTime);
$createTimeBegin = 0;
$createTimeEnd = 0;
if (count($createTimeRow) == 2) {
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[1] . ' 23:59:59');
} else {
$playTimeBegin = strtotime($playTimeRow[0] . ' 00:00:00');
$playTimeEnd = strtotime($playTimeRow[0] . ' 23:59:59');
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
$map['play_time'] = ['between', [$playTimeBegin, $playTimeEnd]];
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
if ($isSelf) {
$map['promote_id'] = $promote['id'];
@ -1898,7 +1898,7 @@ class QueryController extends BaseController
$map['promote_id'] = $promoteId;
}
}
$query = M('user_play_info', 'tab_')->where($map);
$query = M('user_play_info', 'tab_')->where($map)->order('create_time desc');
list($records, $pagination, $count) = $this->paginate($query);
$games = $this->getGamesByPromote($promote);
@ -1949,7 +1949,6 @@ class QueryController extends BaseController
];
}
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$promotes = [];
$groupPromotes = $this->getGroupPromotes($promote);
if ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) {
@ -2001,7 +2000,7 @@ class QueryController extends BaseController
$subQuery = M('spend', 'tab_')->field('game_player_id')->where($subMap)->group('game_player_id')->having($having)->buildSql();
$map['_string'] = 'role_id in ('. $subQuery . ')';
}
$query = M('user_play_info', 'tab_')->where($map);
$query = M('user_play_info', 'tab_')->where($map)->order('play_time desc');
list($roles, $pagination, $count) = $this->paginate($query);
$roleIds = array_column($roles, 'role_id');

@ -52,7 +52,7 @@
<option value="2" <if condition="I('status') === '2'">selected</if>>冻结</option>
</select>
</div>
<if condition="$parent_id eq 0">
<if condition="I('parent_id', 0) eq 0 and $parent_id eq 0">
<div class="form-group normal_space">
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择组长</option>
@ -62,7 +62,7 @@
</select>
</div>
</if>
<if condition="$parent_id gt 0 and $grand_id eq 0">
<if condition="I('parent_id', 0) neq 0 or ($parent_id gt 0 and $grand_id eq 0)">
<div class="form-group normal_space">
<select name="promote_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择推广员</option>

@ -280,7 +280,9 @@ var gameId = $('#game-select').val();
var parentId = $('#group-select').val();
var defaultPromoteId = $('#promote-select').attr('data-promote');
getSubPromotes(parentId, defaultPromoteId)
if ($('#group-select').length > 0) {
getSubPromotes(parentId, defaultPromoteId)
}
$('#group-select').on({
change: function name() {
parentId = $('#group-select').val()

@ -46,7 +46,7 @@
</div>
<if condition="$parent_id eq 0">
<div class="form-group normal_space">
<select id="group-select" name="headman_promote_id" class="reselect select_gallery" style="width: 220px;" >
<select id="group-select" name="headman_promote_id" class="reselect select_gallery" style="width: 220px;">
<option value="0">请选择组长</option>
<volist name="groupPromotes" id="promote">
<option ba-id="{$promote.id}" value="{$promote.id}" <if condition="I('headman_promote_id') == $promote['id']">selected</if>>{$promote.account}({$promote.real_name})</option>
@ -177,7 +177,9 @@ $(function(){
var parentId = $('#group-select').val();
var defaultPromoteId = $('#promote-select').attr('data-promote');
getSubPromotes(parentId, defaultPromoteId)
if ($('#group-select').length > 0) {
getSubPromotes(parentId, defaultPromoteId)
}
$('#group-select').on({
change: function name() {
parentId = $('#group-select').val()

@ -72,7 +72,7 @@
</if>
<div class="form-group normal_space fr">
<label>创建时间:</label>
<input type="text" class="txt range-date" name="play_time" placeholder="创建时间" value="{:I('play_time')}" >
<input type="text" class="txt range-date" name="create_time" placeholder="创建时间" value="{:I('create_time')}" >
</div>
<div class="form-group normal_space fr">
<label>玩家等级:</label>
@ -112,7 +112,13 @@
<td>{$record.server_name}</td>
<td>{$record.role_name}</td>
<td>{$record.role_level}</td>
<td>{$record.play_time|date='Y-m-d H:i:s',###}</td>
<td>
<?php if($record['create_time'] == 0):?>
{$record.play_time|date='Y-m-d H:i:s',###}
<?php else:?>
{$record.create_time|date='Y-m-d H:i:s',###}
<?php endif;?>
</td>
</tr>
</volist>
</empty>
@ -181,7 +187,9 @@ $(function() {
var parentId = $('#group-select').val();
var defaultPromoteId = $('#promote-select').attr('data-promote');
getSubPromotes(parentId, defaultPromoteId)
if ($('#group-select').length > 0) {
getSubPromotes(parentId, defaultPromoteId)
}
$('#group-select').on({
change: function name() {
parentId = $('#group-select').val()

Loading…
Cancel
Save