diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php
index 6a50765dc..79d5ba2c7 100644
--- a/Application/Common/Common/extend.php
+++ b/Application/Common/Common/extend.php
@@ -833,7 +833,15 @@ function Status_recovery($msg){
if (empty($str)) {return $title;}
$find = array('%webname%','%gamename%','%newsname%','%giftname%','%gametype%', '%catetitle%', '%gamedevice%');
- $replace = array($title,$array['game_name'],$array['news_title'],$array['giftbag_name'],$array['game_type_name'],$array['cate_title'],$array['game_device']);
+ $replace = array(
+ $title,
+ $array['game_name'] ?? '',
+ $array['news_title'] ?? '',
+ $array['giftbag_name'] ?? '',
+ $array['game_type_name'] ?? '',
+ $array['cate_title'] ?? '',
+ $array['game_device'] ?? ''
+ );
$str = str_replace($find,$replace,$str);
return preg_replace('/((-|_)+)?((%[0-9A-Za-z_]*%)|%+)((-|_)+)?/','',$str);
diff --git a/Application/Home/Controller/TestingResourceController.class.php b/Application/Home/Controller/TestingResourceController.class.php
index 496e2fa65..564f08db1 100644
--- a/Application/Home/Controller/TestingResourceController.class.php
+++ b/Application/Home/Controller/TestingResourceController.class.php
@@ -23,7 +23,6 @@ class TestingResourceController extends BaseController
$conditions = [];
$subConditions = [
- '_string' => 'user_id = tab_user_play_info.user_id',
'promote_id' => $loginPromote['id'],
];
@@ -34,8 +33,8 @@ class TestingResourceController extends BaseController
$subConditions['create_time'] = ['elt', strtotime($createTimeEnd . ' 23:59:59')];
}
- $subSql = M('testing_user', 'tab_')->field(['1'])->where($subConditions)->select(false);
- $strCondition = 'exists (' . $subSql . ')';
+ $subSql = M('testing_user', 'tab_')->field(['user_id'])->where($subConditions)->select(false);
+ $strCondition = 'user_id in (' . $subSql . ')';
if ($account) {
$user = M('user', 'tab_')->field(['id'])->where('account like ' . $account . '%')->find();
@@ -69,7 +68,7 @@ class TestingResourceController extends BaseController
if (count($roles) > 0) {
$users = M('user', 'tab_')->field(['id', 'phone'])->where(['id' => ['in', $userIds]])->select();
$uesrs = index_by_column('id', $users);
- $bindings = M('testing_binding', 'tab_')->field()->where(['role_id' => ['in', $roleIds]])->select();
+ $bindings = M('testing_binding', 'tab_')->where(['role_id' => ['in', $roleIds]])->select();
$bindings = index_by_column('role_id', $bindings);
$bindingRoleIds = array_column($bindings, 'bind_role_id');
if (count($bindings) > 0) {
@@ -115,12 +114,13 @@ class TestingResourceController extends BaseController
{
$loginPromote = $this->getLoginPromote();
$accountsStr = trim(I('accounts', ''), ',');
- if ($accountsStr = '') {
+ if ($accountsStr == '') {
return $this->ajaxReturn(['status' => 0, 'message' => '请输入测试资源账号']);
}
$accounts = explode(',', $accountsStr);
$accounts = array_unique($accounts);
$existAccounts = M('testing_user', 'tab_')->where(['user_account' => ['in', $accounts]])->getField('user_account', true);
+ $existAccounts = $existAccounts ?? [];
$existCount = count($existAccounts);
$newAccounts = array_diff($accounts, $existAccounts);
$errorCount = 0;
@@ -145,7 +145,7 @@ class TestingResourceController extends BaseController
$successCount ++;
}
}
- return $this->ajaxReturn(['status' => 1, 'message' => '请输入测试资源账号', 'data' => [
+ return $this->ajaxReturn(['status' => 1, 'message' => '请求成功', 'data' => [
'errorCount' => $errorCount,
'successCount' => $successCount,
'existCount' => $existCount,
@@ -196,6 +196,15 @@ class TestingResourceController extends BaseController
}
public function apply()
+ {
+ $records = [];
+ $pagination = '';
+ $this->assign('records', $records);
+ $this->assign('pagination', $pagination);
+ $this->display();
+ }
+
+ public function doApply()
{
$records = I('records', []);
$batchNo = '';
diff --git a/Application/Home/View/default/TestingResource/apply.html b/Application/Home/View/default/TestingResource/apply.html
new file mode 100644
index 000000000..f1e997459
--- /dev/null
+++ b/Application/Home/View/default/TestingResource/apply.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+ 资源类型
+ 资源内容
+ 资源价值
+ 资源数量
+ 备注
+ +
+ -
+
+
+
+
+
+ 198
+
+
+
+
+