From f39930c12ec3f6dd7f8028764f680ac791db9fbb Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Sun, 6 Dec 2020 14:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E9=98=B2=E4=B8=80=E6=89=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/admin/model/CashDraws.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hyhproject/admin/model/CashDraws.php b/hyhproject/admin/model/CashDraws.php index 692bd54..04da207 100755 --- a/hyhproject/admin/model/CashDraws.php +++ b/hyhproject/admin/model/CashDraws.php @@ -314,7 +314,11 @@ class CashDraws extends Base{ // $user->save(); $targetId = $user->userId; - $displayName = $user['userName']; + if (isset($user['userName'])) $displayName = $user['userName']; + else { + \think\Log::write("CASH_DRAW_USERNAME_ISNOT_SET"); + $displayName = $cash->targetId; + } }else{ @@ -327,7 +331,11 @@ class CashDraws extends Base{ // $shop->save(); $targetId = $shop->userId; - $displayName = $shop['userName']; + if (isset($shop['userName'])) $displayName = $shop['userName']; + else { + \think\Log::write("CASH_DRAW_SHOP_USERNAME_ISNOT_SET"); + $displayName = $cash->targetId; + } }