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 @@ + + + + +