Merge branch 'feature/testing_resource_admin' of wmtx/platform into release

测试资源功能修改
master
廖金灵 4 years ago committed by Gogs
commit b7227d95ca

@ -26,6 +26,7 @@ class TestingResourceController extends ThinkController
$gameRepository = new GameRepository();
$this->assign('statusList', TestingResourceRepository::$userStatusList);
$this->assign('games', $gameRepository->getChoiceGames());
$this->assign('servers', $gameRepository->getServersByGameId($gameId));
$this->assign('count', $count);

@ -113,6 +113,14 @@
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
<div class="input-list input-list-promote search_label_rehab">
<select name="status" class="select_gallery" style="width:120px;">
<option value="0">请选择账号状态</option>
<?php foreach($statusList as $key => $value):?>
<option value="<?=$key?>"><?=$value?></option>
<?php endforeach;?>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('TestingResource/index')}">搜索</a>
</div>

@ -360,13 +360,17 @@ class TestingResourceRepository
$statusText = '正常';
if (is_null($user) || is_null($testingUser)) {
$statusText = '错误';
} elseif ($user['lock_status'] != 1) {
$statusText = '锁定';
} elseif ($testingUser['status'] == 2) {
$statusText = '警告';
} elseif ($testingUser['status'] == 3) {
$statusText = '禁用';
}
}
if (is_null($user)) {
$statusText .= '(账号不存在)';
} elseif ($user['lock_status'] != 1) {
$statusText .= '(账号锁定)';
}
$records[] = [
'id' => $role['id'],
@ -401,6 +405,7 @@ class TestingResourceRepository
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? '';
$account = $params['account'] ?? '';
$status = $params['status'] ?? 0;
$roleName = $params['role_name'] ?? '';
$conditions = [];
@ -434,6 +439,9 @@ class TestingResourceRepository
if ($createTimeEnd) {
$strCondition .= ' and create_time <=' . strtotime($createTimeEnd . ' 23:59:59');
}
if ($status != 0) {
$subConditions['status'] = $status;
}
$subConditions['verify_status'] = 1;
$subSql = M('testing_user', 'tab_')->field(['user_id'])->where($subConditions)->select(false);

Loading…
Cancel
Save