diff --git a/Application/Base/Business/ShiftPlayer.class.php b/Application/Base/Business/ShiftPlayer.class.php
index 04686bf21..08faa5900 100644
--- a/Application/Base/Business/ShiftPlayer.class.php
+++ b/Application/Base/Business/ShiftPlayer.class.php
@@ -164,6 +164,9 @@ class ShiftPlayer
private function updateMend($userId, $amount)
{
+ if (count($this->userIds) == 0) {
+ return true;
+ }
return M('mend', 'tab_')
->where(['task_id' => $this->task['id'], 'user_id' => $userId])
->save(['status' => 1, 'pay_amount' => ['exp', 'pay_amount+' . $amount], 'update_time' => time()]);
diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php
index e9041ef69..aa75bb6e2 100644
--- a/Application/Common/Common/extend.php
+++ b/Application/Common/Common/extend.php
@@ -3062,4 +3062,12 @@ function getAggExceptIds($gameSettings)
function getHideAccount($account)
{
return substr($account, 0, 2) . '******' . substr($account, 8);
+}
+
+function getUserAccountOfPromote($account, $promote = null)
+{
+ if ($promote && $promote['level_id'] == 1) {
+ return $account;
+ }
+ return substr($account, 0, 2) . '******' . substr($account, 8);
}
\ No newline at end of file
diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php
index 252951fba..d770cfaab 100644
--- a/Application/Home/Controller/DownloadController.class.php
+++ b/Application/Home/Controller/DownloadController.class.php
@@ -2062,8 +2062,8 @@ class DownloadController extends BaseController
$createTimeBegin = strtotime($createTimeRow[0] . ' 00:00:00');
$createTimeEnd = strtotime($createTimeRow[0] . ' 23:59:59');
}
- if (($createTimeEnd - $createTimeBegin) > 7*24*3600) {
- $this->error('时间范围不能超过7天');
+ if (($createTimeEnd - $createTimeBegin) >31*24*3600) {
+ $this->error('时间范围不能超过31天');
}
$map['create_time'] = ['between', [$createTimeBegin, $createTimeEnd]];
}
diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php
index a477f3abf..1916044d4 100644
--- a/Application/Home/Controller/QueryController.class.php
+++ b/Application/Home/Controller/QueryController.class.php
@@ -213,7 +213,7 @@ class QueryController extends BaseController
$list['p_pro_group_remark'] = $promoteData[$list['parent_id']]['group_remark'];
break;
}
- $list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
+ $list['user_account'] = getUserAccountOfPromote($list['user_account'], $loginPromote);
$list['spend_time'] = date('Y-m-d H:i:s', $list['spend_time']);
$list['pay_time'] = ($list['pay_status'] == 1) ? date('Y-m-d H:i:s', $list['pay_time']) : '--';
$list['pay_status'] = isset(QueryController::$payStatus[$list['pay_status']]) ? QueryController::$payStatus[$list['pay_status']] : '未知状态';
@@ -341,7 +341,7 @@ class QueryController extends BaseController
$list['new_login_time'] = date('Y-m-d H:i:s', $newLoginData['login_time']);
$list['new_login_ip'] = $newLoginData['login_ip'];
- $list['account'] = substr($list['account'], 0, 2) . '******' . substr($list['account'], 8);
+ $list['account'] = getUserAccountOfPromote($list['account'], $loginPromote);
if(!empty($list['device_number'])) {
$list['device_number'] = encryption($list['device_number']);
}
@@ -1598,6 +1598,7 @@ class QueryController extends BaseController
{
$promoteId = D('User')->where('id = %d', I('get.id'))->getField('promote_id');
$permission = hasPromotePermission(PID, $promoteId);//是否有该推广员权限
+ $loginPromote = $this->getLoginPromote();
if ($permission === false) {
$this->error('无推广员权限');
@@ -1642,7 +1643,7 @@ class QueryController extends BaseController
if (!empty($data)) {
foreach ($data as &$list) {
- $list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
+ $list['user_account'] = getUserAccountOfPromote($list['user_account'], $loginPromote);
}
}
@@ -1722,14 +1723,14 @@ class QueryController extends BaseController
$sortName = trim(I('sort_name', ''));
$sort = intval(I('sort', 1));
- $promote = $this->getLoginPromote();
+ $loginPromote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
- $queryPromote = $this->getQueryPromote($levelPromote, function() use ($promote) {
- if ($promote['shift_over_apply'] == 1) {
+ $queryPromote = $this->getQueryPromote($levelPromote, function() use ($loginPromote) {
+ if ($loginPromote['shift_over_apply'] == 1) {
$promoteService = new PromoteService();
- return $promoteService->getTopPromote($promote);
+ return $promoteService->getTopPromote($loginPromote);
} else {
- return $promote;
+ return $loginPromote;
}
});
@@ -1864,7 +1865,7 @@ class QueryController extends BaseController
$records[$key]['create_time'] = date('Y-m-d', $value['create_time']) . '
' . date('H:i:s', $value['create_time']);
}
- $records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen);
+ $records[$key]['user_account'] = getUserAccountOfPromote($value['user_account'], $loginPromote);
$records[$key]['register_time'] = date('Y-m-d', $value['register_time']) . '
' . date('H:i:s', $value['register_time']);
$records[$key]['login_time'] = date('Y-m-d', $value['login_time']) . '
' . date('H:i:s', $value['login_time']);
@@ -1925,7 +1926,7 @@ class QueryController extends BaseController
$nowTime = strtotime($nowTime);
$nowTimeEnd = $nowTime + 3600 * 24 - 1;
- $promote = $this->getLoginPromote();
+ $loginPromote = $this->getLoginPromote();
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
@@ -2045,7 +2046,7 @@ class QueryController extends BaseController
$promotes = M('promote', 'tab_')->field(['id', 'chain', 'account'])->where(['id' => ['in', $promoteIds]])->select();
$promotes = index_by_column('id', $promotes);
foreach ($records as &$list) {
- $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']);
+ $list['user_account'] = empty($list['user_account']) ? '--' : getUserAccountOfPromote($list['user_account'], $loginPromote);
$list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name'];
$list['sdk_version'] = empty($list['sdk_version']) ? '--' : getSDKTypeName($list['sdk_version']);
$list['server_name'] = empty($list['server_name']) ? '--' : $list['server_name'];
@@ -2791,7 +2792,7 @@ class QueryController extends BaseController
$belongs_president = $_REQUEST['belongs_president'];
$belongs_department = $_REQUEST['belongs_department'];
$belongs_group = $_REQUEST['belongs_group'];
- // $createTime = I('create_time', '');
+ $loginPromote = $this->getLoginPromote();
$nowTime = date('Y-m-d');
$initBegTime = date('Y-m-d', strtotime('-6 day', strtotime($nowTime)));
@@ -2841,7 +2842,7 @@ class QueryController extends BaseController
$packAges[$key]['belongs_president'] = $belongs_president;
$packAges[$key]['belongs_department'] = $belongs_department;
$packAges[$key]['belongs_group'] = $belongs_group;
- $packAges[$key]['account'] = encryption($packAges[$key]['account']);
+ $packAges[$key]['account'] = getUserAccountOfPromote($packAges[$key]['account'], $loginPromote);
}
$tfMap['promote_id'] = $promote_id;