diff --git a/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt b/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt index a12f1b9..7ba551c 100644 --- a/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt @@ -27,7 +27,8 @@ object SysLogConverter { startTime = it.startTime, endTime = it.endTime, executeTime = it.executeTime, - userAgent = it.userAgent + userAgent = it.userAgent, + operateUsername = it.operateUsername ) }) diff --git a/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt index ba72dd9..129b348 100644 --- a/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt @@ -1,6 +1,7 @@ package top.fatweb.api.service.system.impl import com.baomidou.mybatisplus.core.metadata.IPage +import com.baomidou.mybatisplus.core.metadata.OrderItem import com.baomidou.mybatisplus.extension.plugins.pagination.Page import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl import org.springframework.stereotype.Service @@ -20,6 +21,7 @@ import top.fatweb.api.service.system.ISysLogService class SysLogServiceImpl : ServiceImpl(), ISysLogService { override fun getPage(page: Long, pageSize: Long): IPage { val sysLogPage = Page(page, pageSize) + sysLogPage.addOrder(OrderItem.desc("start_time")) return baseMapper.selectPage(sysLogPage) } diff --git a/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt b/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt index b3ed3b0..b8d45c6 100644 --- a/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt @@ -51,5 +51,8 @@ class SysLogGetVo( val executeTime: Long?, @Schema(description = "用户代理") - val userAgent: String? + val userAgent: String?, + + @Schema(description = "操作用户名") + val operateUsername: String? )