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() {