管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-10 825ec729d118064c6c1db063d41cc6eef30802d0
1
已修改3个文件
42 ■■■■■ 文件已修改
src/main/java/com/lf/server/mapper/sys/ReportMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/sys/ReportService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sys/ReportMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | 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