|
|
@@ -1,10 +1,21 @@
|
|
|
package com.template.controller;
|
|
|
|
|
|
|
|
|
+import com.template.api.WelcomeLogControllerAPI;
|
|
|
+import com.template.model.enumModel.eLogLevel;
|
|
|
+import com.template.model.result.CommonResult;
|
|
|
+import com.template.model.result.PageUtils;
|
|
|
+import com.template.model.vo.ListVo;
|
|
|
+import com.template.model.vo.LogVo;
|
|
|
+import com.template.services.WelcomeLogService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 操作日志表 前端控制器
|
|
|
@@ -14,7 +25,30 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @since 2026-06-08
|
|
|
*/
|
|
|
@RestController
|
|
|
-public class WelcomeLogController {
|
|
|
+public class WelcomeLogController implements WelcomeLogControllerAPI {
|
|
|
+ @Autowired
|
|
|
+ private WelcomeLogService welcomeLogService;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult queryLogPages(Integer userId,int currentPage, int pageCount, String userName, String operMode, Integer olevelId, String startTime, String endTime) {
|
|
|
+
|
|
|
+
|
|
|
+ PageUtils<LogVo> result = welcomeLogService.queryLogPages(currentPage, pageCount, userName, operMode, olevelId, startTime, endTime);
|
|
|
+
|
|
|
+ return CommonResult.ok(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonResult queryLogLevel() {
|
|
|
+ List<ListVo> result = new ArrayList<>();
|
|
|
+ for (int i = 1; i <= eLogLevel.values().length; i++) {
|
|
|
+ ListVo data = new ListVo();
|
|
|
+ data.setId(i);
|
|
|
+ data.setName(eLogLevel.stringOf(i));
|
|
|
+ result.add(data);
|
|
|
+ }
|
|
|
|
|
|
+ return CommonResult.ok(result);
|
|
|
+ }
|
|
|
}
|
|
|
|