From 0b934b6b8396bfa515072e433fdc05df06bb13a7 Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Wed, 21 Dec 2022 10:49:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E6=B5=81?= =?UTF-8?q?=E9=87=8F=E6=8A=A5=E8=A1=A8=E5=88=86=E9=A1=B5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/controller/ReportController.java | 16 +++++ .../controller/req/UserFlowReportReq.java | 33 +++++++++ .../controller/res/UserFlowReportRes.java | 70 +++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/req/UserFlowReportReq.java create mode 100644 neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/res/UserFlowReportRes.java diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/ReportController.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/ReportController.java index 6eda243f..ff823d0a 100644 --- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/ReportController.java +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/ReportController.java @@ -22,10 +22,14 @@ package fun.asgc.neutrino.proxy.server.controller; import fun.asgc.neutrino.core.annotation.NonIntercept; +import fun.asgc.neutrino.core.db.page.Page; +import fun.asgc.neutrino.core.db.page.PageQuery; import fun.asgc.neutrino.core.web.annotation.GetMapping; import fun.asgc.neutrino.core.web.annotation.RequestMapping; import fun.asgc.neutrino.core.web.annotation.RestController; +import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq; import fun.asgc.neutrino.proxy.server.controller.res.ReportDataViewRes; +import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes; /** * 报表管理 @@ -59,4 +63,16 @@ public class ReportController { .setTotalUpstreamFlow("23K").setTotalDownwardFlow("47M") ; } + + /** + * 用户流量报表分页 + * @param pageQuery + * @param req + * @return + */ + @GetMapping("user/flow-report/page") + public Page userFlowReportPage(PageQuery pageQuery, UserFlowReportReq req) { + // TODO + return null; + } } diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/req/UserFlowReportReq.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/req/UserFlowReportReq.java new file mode 100644 index 00000000..66a2fd7a --- /dev/null +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/req/UserFlowReportReq.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 aoshiguchen + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package fun.asgc.neutrino.proxy.server.controller.req; + +import lombok.Data; + +/** + * @author: aoshiguchen + * @date: 2022/12/21 + */ +@Data +public class UserFlowReportReq { + +} diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/res/UserFlowReportRes.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/res/UserFlowReportRes.java new file mode 100644 index 00000000..7564984d --- /dev/null +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/controller/res/UserFlowReportRes.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2022 aoshiguchen + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package fun.asgc.neutrino.proxy.server.controller.res; + +import lombok.Data; + +import java.util.Date; + +/** + * @author: aoshiguchen + * @date: 2022/12/21 + */ +@Data +public class UserFlowReportRes { + /** + * 用户ID + */ + private Integer userId; + /** + * 用户名称 + */ + private String userName; + /** + * 写入字节数 + */ + private Long writeBytes; + /** + * 读取字节数 + */ + private Long readBytes; + /** + * 写入流量描述 + */ + private String writeFlowStr; + /** + * 读取流量描述 + */ + private String readFlowStr; + /** + * 流量描述 + */ + private String flowStr; + /** + * 报表时间 + */ + private Date date; + /** + * 创建时间 + */ + private Date createTime; +}