解决无法启动问题

This commit is contained in:
Vinjor 2024-10-12 12:57:49 +08:00
parent 5de07b49e6
commit 73661d454e
4 changed files with 38 additions and 20 deletions

View File

@ -37,7 +37,15 @@ public interface RescueSysConfigMapper {
* @param config 参数配置信息
* @return 参数配置集合
*/
public IPage<SysConfig> selectConfigList(Page<SysConfig> page, @Param("vo") SysConfig config);
public List<SysConfig> selectConfigList(SysConfig config);
/**
* 查询参数配置列表
*
* @param config 参数配置信息
* @return 参数配置集合
*/
public IPage<SysConfig> selectConfigListIPage(Page<SysConfig> page, @Param("vo") SysConfig config);
/**
* 根据键名查询参数配置信息

View File

@ -102,7 +102,7 @@ public class SysConfigServiceImpl implements ISysConfigService {
*/
@Override
public IPage<SysConfig> selectConfigList(Page<SysConfig> page, SysConfig config) {
return configMapper2.selectConfigList(page,config);
return configMapper2.selectConfigListIPage(page,config);
}
/**
@ -162,8 +162,8 @@ public class SysConfigServiceImpl implements ISysConfigService {
*/
@Override
public void loadingConfigCache() {
IPage<SysConfig> configsList = configMapper2.selectConfigList(null,new SysConfig());
for (SysConfig config : configsList.getRecords()) {
List<SysConfig> configsList = configMapper2.selectConfigList(new SysConfig());
for (SysConfig config : configsList) {
redisCache2.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
}
}

View File

@ -1,18 +1,13 @@
package cn.iocoder.yudao.module.rescue.utils;
import cn.hutool.extra.spring.SpringUtil;
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
import cn.iocoder.yudao.module.appBase.domain.SysAnnouncement;
import cn.iocoder.yudao.module.appBase.service.ISysAnnouncementService;
import cn.iocoder.yudao.module.constant.UserConstants;
import cn.iocoder.yudao.module.rescue.dto.TaskDto;
import cn.iocoder.yudao.module.system.api.permission.PermissionApi;
import cn.iocoder.yudao.module.system.api.permission.RoleApi;
import cn.iocoder.yudao.module.system.api.permission.dto.RoleReqDTO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
import cn.iocoder.yudao.module.system.service.permission.RoleService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

View File

@ -33,20 +33,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectConfigVo"/>
<include refid="sqlwhereSearch"/>
</select>
<select id="selectConfigListIPage" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="vo.configName != null and vo.configName != ''">
AND config_name like concat('%', #{vo.configName}, '%')
</if>
<if test="vo.configType != null and vo.configType != ''">
AND config_type = #{vo.configType}
</if>
<if test="vo.configKey != null and vo.configKey != ''">
AND config_key like concat('%', #{vo.configKey}, '%')
</if>
</where>
</select>
<select id="selectConfigList" resultMap="SysConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="vo.configName != null and vo.configName != ''">
AND config_name like concat('%', #{vo.configName}, '%')
</if>
<if test="vo.configType != null and vo.configType != ''">
AND config_type = #{vo.configType}
</if>
<if test="vo.configKey != null and vo.configKey != ''">
AND config_key like concat('%', #{vo.configKey}, '%')
</if>
</where>
<if test="configName != null and configName != ''">
AND config_name like concat('%', #{configName}, '%')
</if>
<if test="configType != null and configType != ''">
AND config_type = #{configType}
</if>
<if test="configKey != null and configKey != ''">
AND config_key like concat('%', #{configKey}, '%')
</if>
</where>
</select>
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">