Commit 651eb6b8 authored by Liu lu's avatar Liu lu

Vtiful\Kernel\Excel 优化

parent 1e260b27
......@@ -49,19 +49,14 @@ class LogTraceHandler
public static function createLogTrace($source, $params)
{
if(!Coroutine::inCoroutine()) return;
$userName = '';
try {
$userName = \Meibuyu\Micro\Model\Auth::user()['name'];
}catch (\Throwable $exception){
}
LogTrace::insertOrIgnore([
'request_id' => self::getRequestId(),
'origin_params' => json_encode($params),
'source' => $source,
'created_at' => now(),
'process_info' => '',
'user_name' => $userName
'user_name' => Context::get('auth')['name']??''
]);
}
......
......@@ -60,6 +60,15 @@ class KernelExcelExportService
$this->fileObject = (new \Vtiful\Kernel\Excel(['path' => $dir]))->constMemory($fileName);
}
/**
* @return mixed
*/
public function getFileObject()
{
return $this->fileObject;
}
/**
* 设置居中样式
* @param $width 列宽
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment