|
|
@ -482,6 +482,22 @@ class TestingResourceRepository
|
|
|
|
];
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private function encodeStr($str)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
# 判断字符串长度
|
|
|
|
|
|
|
|
$length = strlen($str);
|
|
|
|
|
|
|
|
if ($length == 1) {
|
|
|
|
|
|
|
|
# 长度为 1 前后拼接 * 号
|
|
|
|
|
|
|
|
$newStr = $str.'*'.rand(1,6);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
# 长度超过1随机插入 * 号
|
|
|
|
|
|
|
|
$newStr = substr_replace($str,str_repeat('*',$length/2),ceil($length/2),$length).mb_substr($str,$length-2,$length,"utf-8");
|
|
|
|
|
|
|
|
// str_repeat('*',$length/2) 星号重复字符长度的一半长度
|
|
|
|
|
|
|
|
// ceil($length/2) 算出从第几个字符开始
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return $newStr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function makeTestingRoleRecords($roles)
|
|
|
|
public function makeTestingRoleRecords($roles)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$result = $this->statByRoles($roles);
|
|
|
|
$result = $this->statByRoles($roles);
|
|
|
@ -553,11 +569,11 @@ class TestingResourceRepository
|
|
|
|
'server_name' => $role['server_name'],
|
|
|
|
'server_name' => $role['server_name'],
|
|
|
|
'server_id' => $role['server_id'],
|
|
|
|
'server_id' => $role['server_id'],
|
|
|
|
'role_id' => $role['role_id'],
|
|
|
|
'role_id' => $role['role_id'],
|
|
|
|
'user_account' => $role['user_account'],
|
|
|
|
'user_account' => $this->encodeStr($role['user_account']),
|
|
|
|
'user_phone' => $user ? $user['phone'] : '',
|
|
|
|
'user_phone' => $user ? $user['phone'] : '',
|
|
|
|
'role_name' => $role['role_name'],
|
|
|
|
'role_name' => $role['role_name'],
|
|
|
|
'binding_id' => $binding ? $binding['id'] : 0,
|
|
|
|
'binding_id' => $binding ? $binding['id'] : 0,
|
|
|
|
'bind_user_account' => $bindingRole ? $bindingRole['user_account'] : '',
|
|
|
|
'bind_user_account' => $bindingRole ? $this->encodeStr($bindingRole['user_account']) : '',
|
|
|
|
'bind_role_name' => $bindingRole ? $bindingRole['role_name'] : '',
|
|
|
|
'bind_role_name' => $bindingRole ? $bindingRole['role_name'] : '',
|
|
|
|
'base_quota' => $gameSetting ? $gameSetting['base_quota'] : 0,
|
|
|
|
'base_quota' => $gameSetting ? $gameSetting['base_quota'] : 0,
|
|
|
|
'other_quota' => intval($role['testing_other_quota']),
|
|
|
|
'other_quota' => intval($role['testing_other_quota']),
|
|
|
|