Skip to content

Commit

Permalink
消息页面重构
Browse files Browse the repository at this point in the history
  • Loading branch information
张林 committed Apr 5, 2024
1 parent ae5b2f0 commit 730af30
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
package io.github.resmq.dashboard.controller;

import io.github.resmq.dashboard.service.TopicsService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.Map;

/**
* <>
*
Expand All @@ -14,9 +19,13 @@
@RequestMapping("/message")
public class MessageController {

@Resource
private TopicsService topicsService;

@RequestMapping("")
public String index(Model model) {

Map<String, Object> allTopicsInfo = topicsService.getAllTopicsInfo(1, Integer.MAX_VALUE, "");
model.addAttribute("topicList", allTopicsInfo.get("data"));
return "message/message.index";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@AllArgsConstructor
public class CommonMessage {

//todo 消息优先级设计? timestamp方式? 路由匹配? 权重?

private String id;

private String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
<section class="content">
<div class="row">
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">主题</span>
<select class="form-control" id="topicName">
<option value="-1">全部</option>
<option value="0">无</option>
<#list topicList as topicInfo>
<option value="${topicInfo.name}">${topicInfo.name}</option>
</#list>
</select>
</div>
</div>
<div class="col-xs-4">
<div class="input-group">
<span class="input-group-addon">消息主题</span>
Expand Down Expand Up @@ -72,7 +85,6 @@
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="${request.contextPath}/static/plugins/jquery/jquery.validate.min.js"></script>
<#--<script src="${request.contextPath}/static/js/message.index.1.js"></script>-->

</body>
Expand Down

0 comments on commit 730af30

Please sign in to comment.