From ae44fc79bd2c224fe62b668c2d417607aca8cc21 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 4 Nov 2019 13:37:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Base/Repository/PromoteRepository.class.php | 3 ++- .../Home/Controller/PromoteCoinController.class.php | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Application/Base/Repository/PromoteRepository.class.php b/Application/Base/Repository/PromoteRepository.class.php index 9f2f55f50..b21ee2073 100644 --- a/Application/Base/Repository/PromoteRepository.class.php +++ b/Application/Base/Repository/PromoteRepository.class.php @@ -8,7 +8,8 @@ class PromoteRepository { } - private function assembleZero($allKeys, $records, $zeroValue) { + private function assembleZero($allKeys, $records, $zeroValue) + { $noExistKeys = array_diff($allKeys, array_keys($records)); foreach ($noExistKeys as $key) { $records[$key] = $zeroValue; diff --git a/Application/Home/Controller/PromoteCoinController.class.php b/Application/Home/Controller/PromoteCoinController.class.php index 8b0b048e3..953193a23 100644 --- a/Application/Home/Controller/PromoteCoinController.class.php +++ b/Application/Home/Controller/PromoteCoinController.class.php @@ -588,13 +588,9 @@ class PromoteCoinController extends BaseController if ($promoteCoin['source_type'] == 2) { return '玩家转账'; } else { - if ($promote['parent_id'] == 1) { - return '会长转账'; - } elseif ($promote['parent_id'] > 0 && $promote['grand_id'] == 0) { - return '组长转账'; - } elseif ($promote['grand_id'] > 0) { - return '推广员转账'; - } + $promoteService = new PromoteService(); + $levelName = $promoteService->getLevelName($promote['level']); + return $levelName . '转账'; } }