From f075a84b147b43881f9d0de7a02e8a95822cf09a Mon Sep 17 00:00:00 2001 From: wanqi <1985087876@qq.com> Date: Mon, 17 Jan 2022 11:41:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/common.php b/app/common.php index f3e032f..17c7cc5 100644 --- a/app/common.php +++ b/app/common.php @@ -532,15 +532,15 @@ if (!function_exists('')) { * 获取当前操作人名称 * User: 万奇 * Date: 2021/12/17 18:41 - * @param $param + * @param $user_id * @param $type - 1为PC端 2-为移动端 * @return mixed */ if (!function_exists('get_operator_name')) { - function get_operator_name($param, $type){ + function get_operator_name($user_id, $type){ $table_name = [ - 1 => ['table' => 'sys_user', 'field' => 'username', 'where' => ['id' => $param['user_id']]], - 2 => ['table' => 'wxk_staff', 'field' => 'name', 'where' => ['user_id' => $param['user_id']]] + 1 => ['table' => 'sys_user', 'field' => 'username', 'where' => ['id' => $user_id]], + 2 => ['table' => 'wxk_staff', 'field' => 'name', 'where' => ['user_id' => $user_id]] ]; return \think\facade\Db::name($table_name[$type]['table'])->where($table_name[$type]['where'])->value($table_name[$type]['field']); } -- Gitee