1
13693261870
2024-11-27 cc078297fdaaa9819ad4f1a0d82fc5264f56d04a
1
已添加3个文件
已修改2个文件
178 ■■■■ 文件已修改
se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-modules/se-system/src/main/java/com/se/system/mapper/IndexMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-modules/se-system/src/main/java/com/se/system/service/IndexService.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-modules/se-system/src/main/resources/mapper/system/IndexMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
说明.txt 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java
@@ -1,18 +1,18 @@
package com.se.system.controller;
import com.alibaba.fastjson2.JSON;
import com.se.common.core.utils.ServletUtils;
import com.se.common.core.utils.StringUtils;
import com.se.common.core.utils.ip.IpUtils;
import com.se.common.core.web.controller.BaseController;
import com.se.common.core.web.domain.AjaxResult;
import com.se.common.core.web.page.TableDataInfo;
import com.se.common.log.annotation.Log;
import com.se.common.log.enums.BusinessType;
import com.se.common.security.utils.SecurityUtils;
import com.se.system.api.domain.SysLogininfor;
import com.se.system.api.domain.SysOperLog;
import com.se.system.api.model.LoginUser;
import com.se.system.service.IndexService;
import com.se.system.service.inte.ISysLogininforService;
import com.se.system.service.inte.ISysOperLogService;
import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -20,6 +20,7 @@
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@@ -27,29 +28,18 @@
@SuppressWarnings("ALL")
public class IndexController extends BaseController {
    @Resource
    IndexService indexService;
    @Resource
    ISysOperLogService operLogService;
    @GetMapping("/monitor")
    public Map<String, Object> monitor() {
        Map<String, Object> map = new HashMap<>();
    @Resource
    ISysLogininforService logininforService;
        return map;
    }
    @GetMapping("/userList")
    public Map<String, Object> userList() {
        Map<String, Object> map = new HashMap<>();
        return map;
    }
    @GetMapping("/uvCount")
    public Map<String, Object> uvCount() {
        Map<String, Object> map = new HashMap<>();
        return map;
    }
    // â‘ PV统计:PV(Page View):页面浏览量或点击量,即网站所有页面被访问的总次数。
    // æ¯æ‰“开或刷新一个页面,PV就会增加一次,多次打开或刷新同一页面则浏览量累计。
    // PV反映了网站用户访问的网页数量,是衡量网站流量的重要指标之一
    @Log(title = "PV统计", businessType = BusinessType.OTHER)
    @GetMapping("/pvCount")
    public Map<String, Object> pvCount() {
        Map<String, Object> map = new HashMap<>();
@@ -57,7 +47,70 @@
        return map;
    }
    //@Log(title = "角色管理", businessType = BusinessType.INSERT)
    // â‘¡è®¿é—®æ•°é‡ï¼šUV(Unique Visitor):独立访客数,指访问网站的独立用户数。一天内同一访客多次访问只计算一次。
    // å¯ä»¥ç†è§£æˆè®¿é—®æŸç½‘站的电脑的数量。网站判断来访电脑的身份是通过来访电脑的cookies实现的。
    // å¦‚果更换了IP后但不清除cookies,再访问相同网站,该网站的统计中UV数是不变的。
    @Log(title = "UV统计", businessType = BusinessType.OTHER)
    @GetMapping("/uvCount")
    public Map<String, Object> uvCount() {
        Map<String, Object> map = new HashMap<>();
        return map;
    }
    // â‘¢æ–°å¢žç”¨æˆ·ç»Ÿè®¡ï¼šä¸€æ®µæ—¶é—´å†…新注册的用户数量。目前定为一周内的新增用户数量。
    @Log(title = "新增用户统计", businessType = BusinessType.OTHER)
    @GetMapping("/newUserCount")
    public Map<String, Object> newUserCount(Integer day) {
        if (null == day || day < 1) day = 7;
        if (day > 365) day = 365;
        Map<String, Object> map = new HashMap<>();
        map.put("newUserCount", indexService.newUserCount(day));
        return map;
    }
    // â‘£ç”¨æˆ·ç™»å½•信息:以一定形式展示新登录或退出登录的用户账户及时间。
    @Log(title = "用户登录信息", businessType = BusinessType.OTHER)
    @GetMapping("/lastLogin")
    public TableDataInfo lastLogin(SysLogininfor logininfor) {
        startPage();
        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
        return getDataTable(list);
    }
    // â‘¤ç”¨æˆ·ç»Ÿè®¡æŽ’行(活跃用户):以一定时间段内的登录时间或登录次数排名,展示前五名的用户信息
    @Log(title = "用户统计排行", businessType = BusinessType.OTHER)
    @GetMapping("/userCountList")
    public Map<String, Object> userCountList() {
        Map<String, Object> map = new HashMap<>();
        return map;
    }
    // â‘¥å¸¸ç”¨ç³»ç»Ÿå±•示/各系统访问信息:基于用户访问次数排名,展示前五个系统的排名
    // å¹¶å±•示各个系统一天内、三天内、一周内的访问次数。【可考虑按其他指标进行排名展示】
    @Log(title = "用户统计排行", businessType = BusinessType.OTHER)
    @GetMapping("/sysVisitList")
    public Map<String, Object> sysVisitList() {
        Map<String, Object> map = new HashMap<>();
        return map;
    }
    @Log(title = "运维监控", businessType = BusinessType.OTHER)
    @GetMapping("/monitor")
    public Map<String, Object> monitor() {
        Map<String, Object> map = new HashMap<>();
        map.put("cpu", "50%");
        map.put("mem", "65%");
        map.put("ratio", "40%");
        return map;
    }
    @GetMapping("/addAccessLog")
    public AjaxResult addAccessLog(String title, int status) {
        long start = System.currentTimeMillis();
@@ -91,5 +144,3 @@
        return toAjax(rows);
    }
}
se-modules/se-system/src/main/java/com/se/system/mapper/IndexMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
package com.se.system.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
@SuppressWarnings("ALL")
public interface IndexMapper
{
    public int newUserCount(@Param("createTime") String createTime);
}
se-modules/se-system/src/main/java/com/se/system/service/IndexService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.se.system.service;
import com.se.system.mapper.IndexMapper;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@Component
@SuppressWarnings("ALL")
public class IndexService {
    @Resource
    IndexMapper indexMapper;
    public static SimpleDateFormat YYYY_MM_DD_HH_MM_SS = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public int newUserCount(int day) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DAY_OF_MONTH, -day);
        String createTime = YYYY_MM_DD_HH_MM_SS.format(calendar.getTime());
        return indexMapper.newUserCount(createTime);
    }
}
se-modules/se-system/src/main/resources/mapper/system/IndexMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.se.system.mapper.IndexMapper">
    <select id="newUserCount" resultType="java.lang.Integer">
        select count(*) from sys_user where create_time >= #{createTime};
    </select>
</mapper>
˵Ã÷.txt
@@ -6,11 +6,27 @@
http://103.135.160.14:9029/prod-api/
103.135.160.14:9029,映射到 192.168.11.206:8090
--------------------------------------------------------
docker-compose logs -f -n 50 se-system
se-gateway-dev.yml,修改
--------------------------------------------------------
1.综合门户子系统
(1)首页界面需要重构,补充部分缺少功能项
(2)增加用户注册页面
2.运行控制子系统
(1)系统配置管理模块
  1)用户软件弹性部署
(2)分系统交互管理模块
  1)交互数据接入控制子模块
  2)交互过程监控
  3)分系统运行控制
  4)分系统监控
  5)分系统软件控制
  6)方案推演控制
  7)异常报警
(3)系统接口管理模块
  1)接口注册子模块
  2)接口检验子模块
--------------------------------------------------------
se-gateway-dev.yml,修改:
uri: lb://se-auth â†’ uri: lb://se-system
uri: lb://se-file â†’ uri: lb://se-system
@@ -25,9 +41,7 @@
      - /system/index/*
--------------------------------------------------------
se-system-dev.yml,添加
--------------------------------------------------------
se-system-dev.yml,添加:
# æœ¬åœ°æ–‡ä»¶ä¸Šä¼ 
file:
    domain: http://127.0.0.1:9300