Fix system log can not search bug

This commit is contained in:
2024-01-02 17:20:49 +08:00
parent 21e9bd98c9
commit 41a9cecdf5
2 changed files with 2 additions and 5 deletions

View File

@@ -45,10 +45,7 @@ class SysLogServiceImpl(
sysLogGetParam?.searchStartTime, sysLogGetParam?.searchStartTime,
sysLogGetParam?.searchEndTime sysLogGetParam?.searchEndTime
) )
sysLogIPage.records.forEach {
it.operateUsername =
it.operateUserId?.let { it1 -> userService.getOne(it1)?.username }
}
if (sysLogIPage.records.isNotEmpty()) { if (sysLogIPage.records.isNotEmpty()) {
val userIds = sysLogIPage.records.map { it.operateUserId } val userIds = sysLogIPage.records.map { it.operateUserId }

View File

@@ -30,7 +30,7 @@
<if test="searchRequestUrl != null"> <if test="searchRequestUrl != null">
and t_sys_log.request_server_address || t_sys_log.request_uri || and t_sys_log.request_server_address || t_sys_log.request_uri ||
case when length(t_sys_log.request_params) != 0 then '?' || t_sys_log.request_params else '' end like case when length(t_sys_log.request_params) != 0 then '?' || t_sys_log.request_params else '' end like
'%'||'mail'||'%' '%'||#{searchRequestUrl}||'%'
</if> </if>
<if test="searchStartTime != null and searchEndTime != null"> <if test="searchStartTime != null and searchEndTime != null">
and t_sys_log.start_time between #{searchStartTime} and #{searchEndTime} and t_sys_log.start_time between #{searchStartTime} and #{searchEndTime}