From 731e4d29f75a9008a4feab28769515bf65c51d18 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 30 Dec 2019 18:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E9=95=BF=E6=8F=90=E7=8E=B0--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 1ee9e1c2f..a61cc0b36 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -430,8 +430,8 @@ class FinanceController extends BaseController $list['settlement_begin_time'] = $list['settlement_begin_time'] ? date('Y-m-d H:i:s', $list['settlement_begin_time']) : '--'; $list['settlement_end_time'] = date('Y-m-d H:i:s', $list['settlement_end_time']); $list['status_name'] = FinanceController::$withdrawStatus[$list['status']]; - $list['op_id'] = ($list['op_type'] == 1) ? get_promote_name($list['op_id']) : getAdminNickname($list['op_id']); - $list['last_op_id'] = ($list['last_op_type'] == 1) ? get_promote_name($list['last_op_id']) : getAdminNickname($list['last_op_id']); + $list['op_id'] = $this->getOpIdByType($list['op_id'], $list['op_type']); + $list['last_op_id'] = $this->getOpIdByType($list['last_op_id'], $list['last_op_type']); $list['op_type'] = getPromoteWithdrawOpType($list['op_type']); $list['last_op_type'] = getPromoteWithdrawOpType($list['last_op_type']); switch ($list['status']) { @@ -460,6 +460,23 @@ class FinanceController extends BaseController $this->display(); } + private function getOpIdByType($opId, $opType) + { + switch ($opType) { + case 1: + $opId = get_promote_name($opId); + break; + case 2: + $opId = getAdminNickname($opId); + break; + case 3: + $opId = '自动'; + break; + } + + return $opId; + } + //提现明细 public function withdrawDtl() {