From 7e173bdd1933603f6f83aaca79517352fa54b938 Mon Sep 17 00:00:00 2001 From: zhangyue <82248909@qq.com> Date: Mon, 7 Sep 2026 11:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E6=B5=8B=E6=9C=8D=E5=8A=A1=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/config/shiro/ShiroConfig.java | 3 + .../appmana/controller/DetectController.java | 65 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/DetectController.java diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 1a3081a..9842f20 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -156,6 +156,9 @@ public class ShiroConfig { filterChainDefinitionMap.put("/error", "anon"); //内部接口 filterChainDefinitionMap.put("/appmana/inner/**", "anon"); + //服务状态监测 + filterChainDefinitionMap.put("/appmana/detectse/**", "anon"); + // update-end--author:liusq Date:20230522 for:[issues/4829]访问不存在的url时会提示Token失效,请重新登录呢 diff --git a/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/DetectController.java b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/DetectController.java new file mode 100644 index 0000000..22bce8e --- /dev/null +++ b/zh-module-applet/zh-applet-admin/src/main/java/org/jeecg/modules/appmana/controller/DetectController.java @@ -0,0 +1,65 @@ +package org.jeecg.modules.appmana.controller; + +import com.alibaba.fastjson.JSONArray; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.dto.SurvSummaryDTO; +import org.jeecg.common.entity.PollutionSetVo; +import org.jeecg.common.entity.ScXy; +import org.jeecg.common.entity.SurvDeviceDeploy; +import org.jeecg.common.iot.common.VOIntegrateStatistic; +import org.jeecg.common.iot.common.VOSurvIntegrateParam; +import org.jeecg.common.iot.common.VOTransData; +import org.jeecg.common.iot.common.VOWaterSurvIntegrateParam; +import org.jeecg.common.util.RedisUtil; +import org.jeecg.common.vo.CommonDataTrans; +import org.jeecg.common.vo.VOBigScreenSurvQ; +import org.jeecg.common.vo.VOHisResult; +import org.jeecg.common.vo.inner.*; +import org.jeecg.common.vo.statistic.SurvSummaryVo; +import org.jeecg.modules.appmana.service.IScXyService; +import org.jeecg.modules.appmana.service.ISurvDeviceDeployService; +import org.jeecg.modules.appmana.service.ISurvDisplayInfoService; +import org.jeecg.modules.appmana.service.impl.CommonServiceImpl; +import org.jeecg.modules.appmana.service.impl.IotCommonP3ServiceImpl; +import org.jeecg.modules.appmana.service.impl.IotCommonServiceImpl; +import org.jeecg.modules.appmana.utils.CommonUtils; +import org.jeecg.modules.appmana.utils.Iotutils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@RestController +@RequestMapping("/appmana/detectse/api") +@Api(tags="服务侦测接口") +public class DetectController { + + @Autowired + private IScXyService scXyService; + @Autowired + private RedisUtil redisUtil; + + + @ApiOperation(value = "1. 侦测服务", notes = "") + @ApiOperationSupport(order = 1) + @GetMapping(value = "/zcfw") + public Result zcfw(HttpServletResponse response) { + Result result = new Result<>(); + try{ + List scXyList = scXyService.list(); + Object o = redisUtil.get("sys_status"); + }catch (Exception e){ + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + result.setMessage(e.getMessage()); + } + return Result.ok("正常"); + } + +}