wangfei
2025-04-10 91a453198edfc4450ecc91adfcccee6ccf25a3f0
hangzhoumesParent/common/servicebase/src/main/java/com/mes/sysconfig/service/impl/SysConfigServiceImpl.java
@@ -8,6 +8,7 @@
import com.mes.sysconfig.entity.request.SysConfigRequest;
import com.mes.sysconfig.mapper.SysConfigMapper;
import com.mes.sysconfig.service.SysConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
@@ -22,6 +23,7 @@
 * @since 2025-04-01 15:01:27
 */
@Service
@Slf4j
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements SysConfigService {
    @Override
@@ -61,5 +63,15 @@
    public Boolean deleteConfig(Serializable id) {
        return this.removeById(id);
    }
    @Override
    public String queryConfigValue(Serializable id) {
        SysConfig sysConfig = this.queryConfigById(id);
        if (sysConfig == null) {
            log.info("系统配置查询为空,请检查该配置是否存在:{}", id);
            return null;
        }
        return sysConfig.getConfigValue();
    }
}