Browse Source

数据解析,缓存未找到,导致解析报错的bug修复

thing_master
xiachao 1 year ago
parent
commit
e8c3279b89
  1. 7
      common/script/src/main/java/com/thing/modules/cache/service/impl/ScriptCacheServiceImpl.java

7
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);
}
}
Loading…
Cancel
Save