From a0f4d01559785001e7b16b21025cc6a42e65d167 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期五, 05 十二月 2025 17:36:31 +0800
Subject: [PATCH] 添加ai事件管理页面
---
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java
new file mode 100644
index 0000000..b6f715e
--- /dev/null
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/eventInfo/EventInfoController.java
@@ -0,0 +1,59 @@
+package com.fzzy.sys.controller.eventInfo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fzzy.igds.constant.RespCodeEnum;
+import com.fzzy.igds.data.IgdsBaseParam;
+import com.fzzy.igds.data.PageResponse;
+import com.fzzy.igds.domain.EventInfo;
+import com.fzzy.sys.manager.eventInfo.EventInfoManager;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+
+@Slf4j
+@Controller
+@RequestMapping("/eventInfo")
+public class EventInfoController {
+
+ private static final String prefix = "eventInfo";
+
+ @Resource
+ private EventInfoManager eventInfoManager;
+
+ @GetMapping
+ public String getEventInfo(
+ Model model) {
+
+ IgdsBaseParam param = new IgdsBaseParam();
+ param.setPage(1);
+ param.setLimit(6);
+ Page<EventInfo> events = eventInfoManager.pageData(param);
+ model.addAttribute("eventInfoList", events.getRecords());
+ model.addAttribute("currentPage", events.getCurrent());
+ model.addAttribute("totalItems", events.getTotal());
+ model.addAttribute("pageSize", events.getSize());
+ return prefix + "/eventInfo";
+ }
+
+ /**
+ * 鍒嗛〉鑾峰彇鏁版嵁
+ *
+ * @param param
+ * @return
+ */
+ @RequestMapping("/pageData")
+ @ResponseBody
+ public PageResponse<Page<EventInfo>> pageData(@RequestBody IgdsBaseParam param) {
+ Page<EventInfo> eventInfoPage = eventInfoManager.pageData(param);
+ if (null == eventInfoPage.getRecords() || eventInfoPage.getRecords().isEmpty()) {
+ return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "鑾峰彇鍒版暟鎹俊鎭负绌�");
+ }
+ return new PageResponse<>(RespCodeEnum.CODE_0000, eventInfoPage);
+ }
+}
--
Gitblit v1.9.3