From 258e10c9d1f26efaa4ed740f2423e82836a869fc Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 14 Jan 2020 16:14:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=BB=93=E7=AE=97=E7=AE=A1=E7=90=86--?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 2 +- .../PromoteGameRatioController.class.php | 11 +- .../Admin/Model/WithdrawModel.class.php | 202 ++++++++++-------- .../View/PromoteGameRatio/applyRatio.html | 4 +- Application/Common/Common/extend.php | 4 + 5 files changed, 125 insertions(+), 98 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index d34964caf..59f7e8482 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -724,7 +724,7 @@ function getAllGameList($groupByRelation = false) { $field = 'id, game_name, relation_game_id, relation_game_name'; if ($groupByRelation) { - $games = M('game', 'tab_')->field($field)->group('relation_game_id')->select(); + $games = M('game', 'tab_')->field($field)->where('id = relation_game_id')->group('relation_game_id')->select(); } else { $games = M('game', 'tab_')->field($field)->select(); } diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 0d08c400c..ca672fba3 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -64,7 +64,7 @@ class PromoteGameRatioController extends ThinkController $promoteIds = array_column($promoteGameRatios, 'promote_id'); $gameIds = array_column($promoteGameRatios, 'game_id'); $promoteFiled = 'id, account, mobile_phone, create_time, status, ver_status'; - $gameFiled = 'id, game_name, ratio'; + $gameFiled = 'id, relation_game_name, ratio'; $promotes = M('promote', 'tab_')->where(array('id' => ['in', $promoteIds]))->getField($promoteFiled, true); $games = M('game', 'tab_')->where(array('id' => ['in', $gameIds]))->getField($gameFiled, true); @@ -103,7 +103,7 @@ class PromoteGameRatioController extends ThinkController $thisPromoteVerStatus = getPromoteVerStatus($promotes[$thisPromoteId]['ver_status'], 2); } if ($issetGame) { - $thisGameName = $games[$thisGameId]['game_name']; + $thisGameName = $games[$thisGameId]['relation_game_name']; $thisGameRatio = $games[$thisGameId]['ratio']; $thisGameRatio = ($thisGameRatio ?? '0.00') . '%'; } @@ -326,7 +326,7 @@ class PromoteGameRatioController extends ThinkController $this->assign('lastRatio', $lastRatio); } - $this->assign('gameList', getAllGameList()); + $this->assign('gameList', getAllGameList(true)); $this->assign('promoteList', getPromoteByLevel(1)); $this->meta_title = $metaTitle; $this->display(); @@ -389,8 +389,11 @@ class PromoteGameRatioController extends ThinkController $promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true); $promoteIds[] = $promoteId; + $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); + $gameIds = $gameIds ?? [-1]; + $spendMap['promote_id'] = ['in', $promoteIds]; - $spendMap['game_id'] = $promoteGameRatio['game_id']; + $spendMap['game_id'] = ['in', $gameIds]; if ($promoteGameRatio['end_time'] > 0) { $spendMap['pay_time'] = ['between', [$promoteGameRatio['begin_time'], $promoteGameRatio['end_time'] + 3600 * 24 - 1]]; } else { diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index ea73951c1..e01e83bc1 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -268,37 +268,42 @@ class WithdrawModel extends Model{ $balance = 0; $notInGameIds = [-1]; foreach ($promoteGameRatios as $promoteGameRatio) { - $spendWhere['game_id'] = $promoteGameRatio['game_id']; if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { - $notInGameIds[] = $promoteGameRatio['game_id']; - $ratio = $promoteGameRatio['ratio']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); - $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") - ->where($spendWhere) - ->find()['sum_amount']; - $sumAmount = $sumAmount ?? 0; - foreach ($turnoverRatios as $turnoverRatio) { - if ($sumAmount >= $turnoverRatio['turnover']) { - $ratio = $turnoverRatio['ratio']; - break; + $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); + if (!empty($gameIds)) { + foreach ($gameIds as $gameId) { + $spendWhere['game_id'] = $gameId; + $notInGameIds[] = $gameId; + $ratio = $promoteGameRatio['ratio']; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); + $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") + ->where($spendWhere) + ->find()['sum_amount']; + $sumAmount = $sumAmount ?? 0; + foreach ($turnoverRatios as $turnoverRatio) { + if ($sumAmount >= $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } + + $thisBalance = $spendModel->field("sum(pay_amount * {$ratio}) as balance") + ->where($spendWhere) + ->find()['balance']; + $thisBalance = $thisBalance ?? 0; + $balance = bcadd($balance, $thisBalance, 2); + + $gameRatios[$gameId] = []; + $gameRatios[$gameId][] = [ + 'selle_ratio' => $ratio, + 'default_ratio' => $promoteGameRatio['ratio'], + 'sum_amount' => $sumAmount, + 'begin_time' => $beginTime, + 'end_time' => $endTime, + ]; } } - - $thisBalance = $spendModel->field("sum(pay_amount * {$ratio}) as balance") - ->where($spendWhere) - ->find()['balance']; - $thisBalance = $thisBalance ?? 0; - $balance = bcadd($balance, $thisBalance, 2); - - $gameRatios[$promoteGameRatio['game_id']] = []; - $gameRatios[$promoteGameRatio['game_id']][] = [ - 'selle_ratio' => $ratio, - 'default_ratio' => $promoteGameRatio['ratio'], - 'sum_amount' => $sumAmount, - 'begin_time' => $beginTime, - 'end_time' => $endTime, - ]; } } @@ -391,33 +396,38 @@ class WithdrawModel extends Model{ $gameRatios = []; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { - $spendMap['game_id'] = $promoteGameRatio['game_id']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); - $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") - ->where($spendMap) - ->find()['sum_amount']; - $sumAmount = $sumAmount ?? 0; - $ratio = 0; - foreach ($turnoverRatios as $turnoverRatio) { - if ($sumAmount >= $turnoverRatio['turnover']) { - $ratio = $turnoverRatio['ratio']; - break; - } - } + $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); + if (!empty($gameIds)) { + foreach ($gameIds as $gameId) { + $spendWhere['game_id'] = $gameId; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); + $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") + ->where($spendMap) + ->find()['sum_amount']; + $sumAmount = $sumAmount ?? 0; + $ratio = 0; + foreach ($turnoverRatios as $turnoverRatio) { + if ($sumAmount >= $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } - if ($ratio > 0) { - $ratio = bcsub($ratio, $promoteGameRatio['ratio'], 2); - $thisBalance = bcdiv(bcmul($sumAmount, $ratio, 2), 100, 2); - $balance = bcadd($balance, $thisBalance, 2); - - $gameRatios[$promoteGameRatio['game_id']][] = [ - 'selle_ratio' => $ratio, - 'default_ratio' => $promoteGameRatio['ratio'], - 'sum_amount' => $sumAmount, - 'begin_time' => date('Y-m-d', $settlementBeginTime), - 'end_time' => date('Y-m-d', $settlementEndTime), - ]; + if ($ratio > 0) { + $ratio = bcsub($ratio, $promoteGameRatio['ratio'], 2); + $thisBalance = bcdiv(bcmul($sumAmount, $ratio, 2), 100, 2); + $balance = bcadd($balance, $thisBalance, 2); + + $gameRatios[$gameId][] = [ + 'selle_ratio' => $ratio, + 'default_ratio' => $promoteGameRatio['ratio'], + 'sum_amount' => $sumAmount, + 'begin_time' => date('Y-m-d', $settlementBeginTime), + 'end_time' => date('Y-m-d', $settlementEndTime), + ]; + } + } } } } @@ -477,25 +487,30 @@ class WithdrawModel extends Model{ $balance = 0; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { - $spendMap['game_id'] = $promoteGameRatio['game_id']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); - $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") - ->where($spendMap) - ->find()['sum_amount']; - $sumAmount = $sumAmount ?? 0; - $ratio = 0; - foreach ($turnoverRatios as $turnoverRatio) { - if ($sumAmount >= $turnoverRatio['turnover']) { - $ratio = $turnoverRatio['ratio']; - break; - } - } + $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); + if (!empty($gameIds)) { + foreach ($gameIds as $gameId) { + $spendMap['game_id'] = $gameId; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); + $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") + ->where($spendMap) + ->find()['sum_amount']; + $sumAmount = $sumAmount ?? 0; + $ratio = 0; + foreach ($turnoverRatios as $turnoverRatio) { + if ($sumAmount >= $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } - if ($ratio > 0) { - $ratio = bcsub($ratio, $promoteGameRatio['ratio'], 2); - $thisBalance = bcdiv(bcmul($sumAmount, $ratio, 2), 100, 2); - $balance = bcadd($balance, $thisBalance, 2); + if ($ratio > 0) { + $ratio = bcsub($ratio, $promoteGameRatio['ratio'], 2); + $thisBalance = bcdiv(bcmul($sumAmount, $ratio, 2), 100, 2); + $balance = bcadd($balance, $thisBalance, 2); + } + } } } } @@ -532,28 +547,33 @@ class WithdrawModel extends Model{ $balance = 0; $notInGameIds = [-1]; foreach ($promoteGameRatios as $promoteGameRatio) { - $spendWhere['game_id'] = $promoteGameRatio['game_id']; if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { - $notInGameIds[] = $promoteGameRatio['game_id']; - $ratio = $promoteGameRatio['ratio']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); - $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") - ->where($spendWhere) - ->find()['sum_amount']; - $sumAmount = $sumAmount ?? 0; - foreach ($turnoverRatios as $turnoverRatio) { - if ($sumAmount >= $turnoverRatio['turnover']) { - $ratio = $turnoverRatio['ratio']; - break; + $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); + if (!empty($gameIds)) { + foreach ($gameIds as $gameId) { + $spendWhere['game_id'] = $gameId; + $notInGameIds[] = $gameId; + $ratio = $promoteGameRatio['ratio']; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); + $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") + ->where($spendWhere) + ->find()['sum_amount']; + $sumAmount = $sumAmount ?? 0; + foreach ($turnoverRatios as $turnoverRatio) { + if ($sumAmount >= $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } + + $thisBalance = $spendModel->field("sum(pay_amount * {$ratio}) as balance") + ->where($spendWhere) + ->find()['balance']; + $thisBalance = $thisBalance ?? 0; + $balance = bcadd($balance, $thisBalance, 2); } } - - $thisBalance = $spendModel->field("sum(pay_amount * {$ratio}) as balance") - ->where($spendWhere) - ->find()['balance']; - $thisBalance = $thisBalance ?? 0; - $balance = bcadd($balance, $thisBalance, 2); } } diff --git a/Application/Admin/View/PromoteGameRatio/applyRatio.html b/Application/Admin/View/PromoteGameRatio/applyRatio.html index 7d14a96be..a75a45d7a 100644 --- a/Application/Admin/View/PromoteGameRatio/applyRatio.html +++ b/Application/Admin/View/PromoteGameRatio/applyRatio.html @@ -105,11 +105,11 @@ - + - + diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index e774ef468..fd93d3863 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -1106,6 +1106,10 @@ function getGameSelleRatioByPromote($promoteId = null, $gameId = null) $promoteId = intval($promoteId); $gameId = intval($gameId); $promote = M('promote', 'tab_')->find($promoteId); + $gameId = M('game', 'tab_')->where(array('id' => $gameId))->getField('relation_game_id'); + if (empty($gameId)) { + return false; + } if (empty($promote)) { return false; From 71e02a4add2826f6430a5996513519b5ceee2ec0 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Tue, 14 Jan 2020 17:03:09 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=BB=93=E7=AE=97=E7=AE=A1=E7=90=86--?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Model/WithdrawModel.class.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index e01e83bc1..dbd374981 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -269,14 +269,14 @@ class WithdrawModel extends Model{ $notInGameIds = [-1]; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { + $ratio = $promoteGameRatio['ratio']; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); if (!empty($gameIds)) { foreach ($gameIds as $gameId) { $spendWhere['game_id'] = $gameId; $notInGameIds[] = $gameId; - $ratio = $promoteGameRatio['ratio']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") ->where($spendWhere) ->find()['sum_amount']; @@ -396,12 +396,12 @@ class WithdrawModel extends Model{ $gameRatios = []; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); if (!empty($gameIds)) { foreach ($gameIds as $gameId) { - $spendWhere['game_id'] = $gameId; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); + $spendMap['game_id'] = $gameId; $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") ->where($spendMap) ->find()['sum_amount']; @@ -487,12 +487,12 @@ class WithdrawModel extends Model{ $balance = 0; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); if (!empty($gameIds)) { foreach ($gameIds as $gameId) { $spendMap['game_id'] = $gameId; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") ->where($spendMap) ->find()['sum_amount']; @@ -548,14 +548,14 @@ class WithdrawModel extends Model{ $notInGameIds = [-1]; foreach ($promoteGameRatios as $promoteGameRatio) { if (!empty($promoteGameRatio['turnover_ratio']) && $promoteGameRatio['begin_time'] <= $settlementBeginTime && (empty($promoteGameRatio['end_time']) || $promoteGameRatio['end_time'] >= $settlementEndTime)) { + $ratio = $promoteGameRatio['ratio']; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $gameIds = D('game')->where(array('relation_game_id' => $promoteGameRatio['game_id']))->getField('id', true); if (!empty($gameIds)) { foreach ($gameIds as $gameId) { $spendWhere['game_id'] = $gameId; $notInGameIds[] = $gameId; - $ratio = $promoteGameRatio['ratio']; - $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); - $turnoverRatios = array_reverse($promoteGameRatio['turnover_ratio']); $sumAmount = $spendModel->field("sum(pay_amount) as sum_amount") ->where($spendWhere) ->find()['sum_amount']; From 7ac22521ddeb3fd141768092f953df196f65fcea Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 14 Jan 2020 17:09:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A7=93=E5=90=8D=E5=8F=AA=E7=95=99?= =?UTF-8?q?=E5=A7=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 11 ++++++----- .../Home/Controller/PromoteController.class.php | 2 ++ Application/Home/Controller/QueryController.class.php | 4 ++-- Application/Home/Controller/SafeController.class.php | 7 +++++-- Application/Home/View/default/Safe/editModify.html | 4 ++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 6d36d1428..9d549976e 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2199,10 +2199,11 @@ class DownloadController extends BaseController { if($value1['status'] == 2) { $value1['promotestatus'] = "冻结中"; } - $value1['account'] = substr_replace($value1['account'],'****',2); + $realname = mb_strlen($value1['real_name'],'utf-8') == 2 ? mb_substr($value1['real_name'],0,1,'utf-8').'*':mb_substr($value1['real_name'],0,1,'utf-8').'**'; + $value1['real_name'] = $realname; $value1['idcard'] = substr_replace($value1['idcard'],'************',3,12); - $value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); - $xlsData[] = $value1; + $value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); + $xlsData[] = $value1; } $this->exportExcel($xlsName, $xlsCell, $xlsData,$id); } @@ -3087,7 +3088,7 @@ class DownloadController extends BaseController { $records[] = [ 'id' => $parent['id'], 'account' => $parent['account'], - 'real_name' => $parent['real_name'], + 'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**', 'level' => $parent['level'], 'create_role_count' => $selfCreateRoleCountList[$parent['id']], 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], @@ -3109,7 +3110,7 @@ class DownloadController extends BaseController { $records[] = [ 'id' => $id, 'account' => $promote['account'], - 'real_name' => $promote['real_name'], + 'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**', 'level' => $promote['level'], 'create_role_count' => $createRoleCountList[$id], 'create_role_user_count' => $createRoleUserCountList[$id], diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 36055ccf8..e08f08cdb 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -972,6 +972,8 @@ class PromoteController extends BaseController list($records, $pagination, $count) = $this->paginate($query); foreach ($records as $key => $value) { + $realname = mb_strlen($value['real_name'],'utf-8') == 2 ? mb_substr($value['real_name'],0,1,'utf-8').'*':mb_substr($value['real_name'],0,1,'utf-8').'**'; + $records[$key]['real_name'] = $realname; $records[$key]['idcard'] = encryption($value['idcard']); $records[$key]['mobile_phone'] = encryption($value['mobile_phone']); } diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 660ccec8a..b51415efc 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2112,7 +2112,7 @@ class QueryController extends BaseController $records[] = [ 'id' => $parent['id'], 'account' => $parent['account'], - 'real_name' => $parent['real_name'], + 'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**', 'level' => $parent['level'], 'create_role_count' => $selfCreateRoleCountList[$parent['id']], 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], @@ -2134,7 +2134,7 @@ class QueryController extends BaseController $records[] = [ 'id' => $id, 'account' => $promote['account'], - 'real_name' => $promote['real_name'], + 'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**', 'level' => $promote['level'], 'create_role_count' => $createRoleCountList[$id], 'create_role_user_count' => $createRoleUserCountList[$id], diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 90d4ba04b..5a26463f4 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -352,13 +352,16 @@ class SafeController extends BaseController{ } */ $promoteInfo = ""; $address = json_decode($rs['address'],false)[1]; + $realname = mb_strlen($rs['real_name'],'utf-8') == 2 ? mb_substr($rs['real_name'],0,1,'utf-8').'*':mb_substr($rs['real_name'],0,1,'utf-8').'**'; $this->assign('addr',$address); $this->assign('ver_status',$rs['ver_status']); $this->assign('rs',$rs); + $this->assign('idcard',encryption($rs['idcard'])); + $this->assign('real_name',$realname); $this->assign('promoteInfo',$promoteInfo); - $this->assign('tel',$rs['mobile_phone']); + $this->assign('tel',encryption($rs['mobile_phone'])); $this->display(); - } + } public function edit() { $id = get_pid(); diff --git a/Application/Home/View/default/Safe/editModify.html b/Application/Home/View/default/Safe/editModify.html index 96ab1b25d..34fd06d37 100644 --- a/Application/Home/View/default/Safe/editModify.html +++ b/Application/Home/View/default/Safe/editModify.html @@ -121,10 +121,10 @@
资质认证
- 真实姓名: {$rs['real_name']} + 真实姓名: {$real_name}
- 身份证号码: {$rs['idcard']} + 身份证号码: {$idcard}
身份证扫描: 已认证