diff --git a/app/common.php b/app/common.php index f3e032fb7267f40cab74c19d71b07b1608c82027..17c7cc501458065433b533926dd964a239f2ec6a 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']); }