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; + } }