解决无法启动

This commit is contained in:
1378012178@qq.com 2025-08-29 08:49:43 +08:00
parent 0a3a6b169f
commit 6235bbb341
4 changed files with 130 additions and 7 deletions

View File

@ -56,7 +56,7 @@ public class ShiroConfig {
private JeecgBaseConfig jeecgBaseConfig;
@Autowired(required = false)
private RedisProperties redisProperties;
/**
* Filter Chain定义说明
*
@ -110,6 +110,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
filterChainDefinitionMap.put("/sys/checkAuth", "anon"); //授权接口排除
filterChainDefinitionMap.put("/openapi/call/**", "anon"); // 开放平台接口排除
// filterChainDefinitionMap.put("/exportapi/homeApi/**", "anon"); // 首页大屏暴露接口
//update-begin--Author:scott Date:20221116 for排除静态资源后缀
filterChainDefinitionMap.put("/", "anon");
@ -144,7 +146,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/jmreport/**", "anon");
filterChainDefinitionMap.put("/**/*.js.map", "anon");
filterChainDefinitionMap.put("/**/*.css.map", "anon");
//积木BI大屏和仪表盘排除
filterChainDefinitionMap.put("/drag/view", "anon");
filterChainDefinitionMap.put("/drag/page/queryById", "anon");
@ -177,7 +179,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/version/app3version", "anon");
//仪表盘按钮通信
filterChainDefinitionMap.put("/dragChannelSocket/**","anon");
//性能监控安全隐患泄露TOEKNdurid连接池也有
//filterChainDefinitionMap.put("/actuator/**", "anon");
//测试模块排除
@ -187,7 +189,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/error", "anon");
// 企业微信证书排除
filterChainDefinitionMap.put("/WW_verify*", "anon");
// 添加自己的过滤器并且取名为jwt
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
//如果cloudServer为空 则说明是单体 需要加载跨域配置微服务跨域切换
@ -305,7 +307,7 @@ public class ShiroConfig {
/**
* RedisConfig在项目starter项目中
* jeecg-boot-starter-github\jeecg-boot-common\src\main\java\org\jeecg\common\modules\redis\config\RedisConfig.java
*
*
* 配置shiro redisManager
* 使用的是shiro-redis开源插件
*
@ -327,7 +329,7 @@ public class ShiroConfig {
return sentinelManager;
}
// redis 单机支持在集群为空或者集群无机器时候使用 add by jzyadmin@163.com
if (lettuceConnectionFactory.getClusterConfiguration() == null || lettuceConnectionFactory.getClusterConfiguration().getClusterNodes().isEmpty()) {
RedisManager redisManager = new RedisManager();

View File

@ -10,5 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>jeecg-system-local-api</artifactId>
<dependencies>
</dependencies>
</project>
</project>

View File

@ -0,0 +1,112 @@
package org.jeecg.exportapi.api;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.exportapi.entity.HomeApiEntity;
import org.jeecg.modules.heating.entity.Heatanalysis;
import org.jeecg.modules.heating.entity.Heatsource;
import org.jeecg.modules.heating.entity.Heatsourcestation;
import org.jeecg.modules.heating.entity.Thermalcompany;
import org.jeecg.modules.heating.service.HeatanalysisService;
import org.jeecg.modules.heating.service.HeatsourceService;
import org.jeecg.modules.heating.service.HeatsourcestationService;
import org.jeecg.modules.heating.service.ThermalcompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("/exportapi/homeApi")
public class HomeApi {
//公司
@Autowired
private ThermalcompanyService thermalcompanyService;
//锅炉房
@Autowired
private HeatsourceService heatsourceService;
//换热站
private HeatsourcestationService heatsourcestationService;
//各信息温度压力热量流量等
@Autowired
private HeatanalysisService heatanalysisService;
/**
* 城区锅炉房数量
* 城区换热站数量
* 郊县数量郊县公司数量
* 郊县锅炉房数量
*
* @param dto
* @return
*/
@RequestMapping(value = "/slcx", method = RequestMethod.POST)
public Result<?> slcx(HomeApiEntity dto) {
Map<String,Object> result = new HashMap<>();
//城区锅炉房数量
LambdaQueryChainWrapper<Heatsource> qw1 = heatsourceService.lambdaQuery();
qw1.eq(Heatsource::getRegionType,"城区");
qw1.eq(Heatsource::getDelFlag,"0");
qw1.orderByAsc(Heatsource::getId);
List<Heatsource> heatsourceCQList = qw1.list();
result.put("cqglfsl",heatsourceCQList.size());
//城区换热站数量
LambdaQueryChainWrapper<Heatsourcestation> qw2 = heatsourcestationService.lambdaQuery();
qw2.eq(Heatsourcestation::getDelFlag,"0");
qw2.orderByAsc(Heatsourcestation::getId);
List<Heatsourcestation> heatsourcestationList = qw2.list();
result.put("cqhrzsl",heatsourcestationList.size());
//郊县数量郊县公司数量
LambdaQueryChainWrapper<Thermalcompany> qw3 = thermalcompanyService.lambdaQuery();
qw3.eq(Thermalcompany::getRegionType,"城区");
qw3.eq(Thermalcompany::getDelFlag,"0");
qw3.orderByAsc(Thermalcompany::getId);
List<Thermalcompany> thermalcompanyList = qw3.list();
result.put("jxsl",thermalcompanyList.size());
//郊县锅炉房数量
LambdaQueryChainWrapper<Heatsource> qw4 = heatsourceService.lambdaQuery();
qw4.eq(Heatsource::getRegionType,"郊县");
qw4.eq(Heatsource::getDelFlag,"0");
qw4.orderByAsc(Heatsource::getId);
List<Heatsource> heatsourceJXList = qw4.list();
result.put("jxglfsl",heatsourceJXList.size());
return Result.ok(result);
}
/**
* 数据查询 一次网
* 城区锅炉房供回水温度
* 郊县供回水温度
* 郊县锅炉房瞬时热量
* 郊县锅炉房瞬时流量
*
* @param dto
* @return
*/
@RequestMapping(value = "/cqglfgswd", method = RequestMethod.POST)
public Result<?> cqglfgswd(HomeApiEntity dto) {
Map<String,Object> result = new HashMap<>();
//城区锅炉房供回水温度
LambdaQueryChainWrapper<Heatanalysis> qw = heatanalysisService.lambdaQuery();
qw.eq(Heatanalysis::getDelFlag,"0");
// qw.eq(Heatanalysis::getRegionType,"城区");
qw.orderByAsc(Heatanalysis::getId);
List<Heatanalysis> list = qw.list();
result.put("data",list);
return Result.ok(result);
}
}

View File

@ -0,0 +1,7 @@
package org.jeecg.exportapi.entity;
import lombok.Data;
@Data
public class HomeApiEntity {
}