src/main/java/com/lf/server/mapper/sys/ReportMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/lf/server/service/sys/ReportService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/sys/ReportMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/lf/server/mapper/sys/ReportMapper.java
@@ -1,5 +1,6 @@ package com.lf.server.mapper.sys; import com.lf.server.entity.ctrl.CountEntity; import com.lf.server.entity.sys.ReportEntity; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @@ -93,4 +94,25 @@ * @return */ public Integer updates(List<ReportEntity> list); /** * 数据量统计 * * @return */ public List<CountEntity> countSizes(); /** * 服务调用量统计 * * @return */ public List<CountEntity> countServices(); /** * 用户流量统计 * * @return */ public List<CountEntity> countOperates(); } src/main/java/com/lf/server/service/sys/ReportService.java
@@ -1,5 +1,6 @@ package com.lf.server.service.sys; import com.lf.server.entity.ctrl.CountEntity; import com.lf.server.entity.sys.ReportEntity; import com.lf.server.helper.StringHelper; import com.lf.server.mapper.sys.ReportMapper; @@ -70,4 +71,19 @@ public Integer updates(List<ReportEntity> list) { return reportMapper.updates(list); } @Override public List<CountEntity> countSizes() { return reportMapper.countSizes(); } @Override public List<CountEntity> countServices() { return reportMapper.countServices(); } @Override public List<CountEntity> countOperates() { return reportMapper.countOperates(); } } src/main/resources/mapper/sys/ReportMapper.xml
@@ -81,7 +81,7 @@ </select> <!-- 服务调用量统计 --> <select id=""> <select id="countServices"> select name "m1", count(*) "count" from lf.sys_serve_log group by name @@ -89,7 +89,7 @@ </select> <!-- 用户流量统计 --> <select id="countOperate" resultType="com.lf.server.entity.ctrl.CountEntity"> <select id="countOperates" resultType="com.lf.server.entity.ctrl.CountEntity"> select modular1 "m1", modular2 "m2", count(*) "count" from lf.sys_operate group by modular1,modular2