zjh
2025-06-20 ac544c1d85c53e7f51e4ea76aa2489a14aef03d9
ltkj-system/src/main/java/com/ltkj/system/service/impl/SysConfigServiceImpl.java
@@ -46,7 +46,7 @@
     * @return 参数配置信息
     */
    @Override
    @DataSource(DataSourceType.MASTER)
//    @DataSource(DataSourceType.MASTER)
    public SysConfig selectConfigById(Long configId) {
        SysConfig config = new SysConfig();
        config.setConfigId(configId);
@@ -61,15 +61,15 @@
     */
    @Override
    public String selectConfigByKey(String configKey) {
        String configValue = Convert.toStr(redisCache.getCacheObject(getCacheKey(configKey)));
        if (StringUtils.isNotEmpty(configValue)) {
            return configValue;
        }
//        String configValue = Convert.toStr(redisCache.getCacheObject(getCacheKey(configKey)));
//        if (StringUtils.isNotEmpty(configValue)) {
//            return configValue;
//        }
        SysConfig config = new SysConfig();
        config.setConfigKey(configKey);
        SysConfig retConfig = configMapper.selectConfig(config);
        if (StringUtils.isNotNull(retConfig)) {
            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
//            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
            return retConfig.getConfigValue();
        }
        return StringUtils.EMPTY;