From e8c3279b896a4958126fe9c94cb67c2636527786 Mon Sep 17 00:00:00 2001 From: xiachao Date: Wed, 11 Sep 2024 10:12:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A7=A3=E6=9E=90=EF=BC=8C?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=9C=AA=E6=89=BE=E5=88=B0=EF=BC=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=A7=A3=E6=9E=90=E6=8A=A5=E9=94=99=E7=9A=84bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/cache/service/impl/ScriptCacheServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/script/src/main/java/com/thing/modules/cache/service/impl/ScriptCacheServiceImpl.java b/common/script/src/main/java/com/thing/modules/cache/service/impl/ScriptCacheServiceImpl.java index 4b41f29..4da69c2 100644 --- a/common/script/src/main/java/com/thing/modules/cache/service/impl/ScriptCacheServiceImpl.java +++ b/common/script/src/main/java/com/thing/modules/cache/service/impl/ScriptCacheServiceImpl.java @@ -3,6 +3,8 @@ package com.thing.modules.cache.service.impl; import com.thing.common.cache.constants.CacheNameEnum; import com.thing.modules.cache.bean.ScriptCache; import com.thing.modules.cache.service.ScriptCacheService; +import com.thing.modules.service.ScriptInfoService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; @@ -13,7 +15,8 @@ import org.springframework.stereotype.Service; **/ @Service public class ScriptCacheServiceImpl implements ScriptCacheService { - + @Autowired + ScriptInfoService scriptInfoService; /** * 注册 * @@ -46,6 +49,6 @@ public class ScriptCacheServiceImpl implements ScriptCacheService { @Override @Cacheable(value = CacheNameEnum.SCRIPT_INFO, key = "#key") public ScriptCache get(String key) { - return null; + return scriptInfoService.getByIdAs(Long.parseLong(key),ScriptCache.class); } }