开启缓存

beetlsql3-dev
Mlxa0324 2 years ago
parent df090f8ccc
commit 83baa8992d

@ -16,12 +16,16 @@ import com.ibeetl.admin.core.util.PlatformException;
import org.apache.commons.collections4.CollectionUtils;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import static com.ibeetl.admin.core.service.CorePlatformService.USER_FUNCTION_TREE_CACHE;
/**
* @author TLT
*
@ -120,6 +124,7 @@ public class FunctionConsoleService extends CoreBaseService<CoreFunction> {
* @param userId
* @return
*/
@Cacheable(value=USER_FUNCTION_TREE_CACHE, key="userId")
public String getFunctionIdByUser(Long userId){
return this.roleFunctionConsoleDao.getFunctionIdByUser(userId);
}

@ -42,7 +42,7 @@ public class CoreDictService extends CoreBaseService<CoreDict> {
* @param type
* @return List
*/
@Cacheable(value = CorePlatformService.DICT_CACHE_TYPE)
@Cacheable(value = CorePlatformService.DICT_CACHE_TYPE, unless="#result == null || #result.size() == 0")
public List<CoreDict> findAllByType(String type) {
return dictDao.findAllList(type);
}

@ -41,6 +41,7 @@ public class CorePlatformService {
public static final String MENU_TREE_CACHE = "cache:core:menuTree";
public static final String ORG_TREE_CACHE = "cache:core:orgTree";
public static final String FUNCTION_TREE_CACHE = "cache:core:functionTree";
public static final String USER_FUNCTION_TREE_CACHE = "cache:core:userFunction";
//字典列表
public static final String DICT_CACHE_TYPE = "cache:core:dictType";
public static final String DICT_CACHE_VALUE = "cache:core:dictValue";

Loading…
Cancel
Save