监测服务状态接口
This commit is contained in:
parent
593a2fafac
commit
7e173bdd19
|
|
@ -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失效,请重新登录呢
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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<ScXy> 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("正常");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue