From 3b8b871811fc6eb88539097f80071a04abfc7a75 Mon Sep 17 00:00:00 2001 From: aoshiguchen <1052045476@qq.com> Date: Wed, 18 Jan 2023 15:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=B5=81=E9=87=8F=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E9=80=BB=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/res/UserFlowReportRes.java | 8 +++++++ .../proxy/server/dal/UserReportMapper.java | 22 +++++++++++++++++++ .../proxy/server/service/ReportService.java | 5 +++++ .../resources/mapper/UserReportMapper.xml | 14 ++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/UserReportMapper.java create mode 100644 neutrino-proxy-server/src/main/resources/mapper/UserReportMapper.xml 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 index 7564984d..f854b3ac 100644 --- 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 @@ -39,6 +39,14 @@ public class UserFlowReportRes { * 用户名称 */ private String userName; + /** + * 历史写入字节数 + */ + private Long historyWriteBytes; + /** + * 历史读取字节数 + */ + private Long historyReadBytes; /** * 写入字节数 */ diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/UserReportMapper.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/UserReportMapper.java new file mode 100644 index 00000000..5d387efa --- /dev/null +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/dal/UserReportMapper.java @@ -0,0 +1,22 @@ +package fun.asgc.neutrino.proxy.server.dal; + +import fun.asgc.neutrino.core.annotation.Component; +import fun.asgc.neutrino.core.annotation.Param; +import fun.asgc.neutrino.core.aop.Intercept; +import fun.asgc.neutrino.core.db.mapper.SqlMapper; +import fun.asgc.neutrino.core.db.page.Page; +import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes; + +import java.util.Date; + +/** + * @author: aoshiguchen + * @date: 2023/1/18 + */ +@Intercept(ignoreGlobal = true) +@Component +public interface UserReportMapper extends SqlMapper { + + void userFlowReportPage(Page page, @Param("todayBegin") Date todayBegin, @Param("todayEnd") Date todayEnd); + +} diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java index 802328b3..40aa3543 100644 --- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/service/ReportService.java @@ -21,6 +21,7 @@ */ package fun.asgc.neutrino.proxy.server.service; +import fun.asgc.neutrino.core.annotation.Autowired; import fun.asgc.neutrino.core.annotation.Component; import fun.asgc.neutrino.core.annotation.NonIntercept; import fun.asgc.neutrino.core.db.page.Page; @@ -29,6 +30,7 @@ import fun.asgc.neutrino.proxy.server.controller.req.LicenseFlowReportReq; import fun.asgc.neutrino.proxy.server.controller.req.UserFlowReportReq; import fun.asgc.neutrino.proxy.server.controller.res.LicenseFlowReportRes; import fun.asgc.neutrino.proxy.server.controller.res.UserFlowReportRes; +import fun.asgc.neutrino.proxy.server.dal.UserReportMapper; import lombok.extern.slf4j.Slf4j; /** @@ -40,6 +42,9 @@ import lombok.extern.slf4j.Slf4j; @Component public class ReportService { + @Autowired + private UserReportMapper userReportMapper; + /** * 用户流量报表分页 * @param pageQuery diff --git a/neutrino-proxy-server/src/main/resources/mapper/UserReportMapper.xml b/neutrino-proxy-server/src/main/resources/mapper/UserReportMapper.xml new file mode 100644 index 00000000..267d4f04 --- /dev/null +++ b/neutrino-proxy-server/src/main/resources/mapper/UserReportMapper.xml @@ -0,0 +1,14 @@ + + + + +