Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-micro
Commits
651eb6b8
Commit
651eb6b8
authored
Jul 20, 2023
by
Liu lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vtiful\Kernel\Excel 优化
parent
1e260b27
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
LogTraceHandler.php
src/Handler/LogTrace/LogTraceHandler.php
+1
-6
KernelExcelExportService.php
src/Tools/KernelExcelExportService.php
+9
-0
No files found.
src/Handler/LogTrace/LogTraceHandler.php
View file @
651eb6b8
...
@@ -49,19 +49,14 @@ class LogTraceHandler
...
@@ -49,19 +49,14 @@ class LogTraceHandler
public
static
function
createLogTrace
(
$source
,
$params
)
public
static
function
createLogTrace
(
$source
,
$params
)
{
{
if
(
!
Coroutine
::
inCoroutine
())
return
;
if
(
!
Coroutine
::
inCoroutine
())
return
;
$userName
=
''
;
try
{
$userName
=
\Meibuyu\Micro\Model\Auth
::
user
()[
'name'
];
}
catch
(
\Throwable
$exception
){
}
LogTrace
::
insertOrIgnore
([
LogTrace
::
insertOrIgnore
([
'request_id'
=>
self
::
getRequestId
(),
'request_id'
=>
self
::
getRequestId
(),
'origin_params'
=>
json_encode
(
$params
),
'origin_params'
=>
json_encode
(
$params
),
'source'
=>
$source
,
'source'
=>
$source
,
'created_at'
=>
now
(),
'created_at'
=>
now
(),
'process_info'
=>
''
,
'process_info'
=>
''
,
'user_name'
=>
$userName
'user_name'
=>
Context
::
get
(
'auth'
)[
'name'
]
??
''
]);
]);
}
}
...
...
src/Tools/KernelExcelExportService.php
View file @
651eb6b8
...
@@ -60,6 +60,15 @@ class KernelExcelExportService
...
@@ -60,6 +60,15 @@ class KernelExcelExportService
$this
->
fileObject
=
(
new
\Vtiful\Kernel\Excel
([
'path'
=>
$dir
]))
->
constMemory
(
$fileName
);
$this
->
fileObject
=
(
new
\Vtiful\Kernel\Excel
([
'path'
=>
$dir
]))
->
constMemory
(
$fileName
);
}
}
/**
* @return mixed
*/
public
function
getFileObject
()
{
return
$this
->
fileObject
;
}
/**
/**
* 设置居中样式
* 设置居中样式
* @param $width 列宽
* @param $width 列宽
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment