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); } }