Java Code Examples for org.jeecg.common.constant.CacheConstant#SYS_DICT_TABLE_CACHE

The following examples show how to use org.jeecg.common.constant.CacheConstant#SYS_DICT_TABLE_CACHE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SysDictServiceImpl.java    From jeecg-cloud with Apache License 2.0 6 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典,包含text和value
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param keyArray
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
	List<DictModel> dicts = sysDictMapper.queryTableDictByKeys(table, text, code, keyArray);
	List<String> texts = new ArrayList<>(dicts.size());
	// 查询出来的顺序可能是乱的,需要排个序
	for (String key : keyArray) {
		for (DictModel dict : dicts) {
			if (key.equals(dict.getValue())) {
				texts.add(dict.getText());
				break;
			}
		}
	}
	return texts;
}
 
Example 2
Source File: SysDictServiceImpl.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典,包含text和value
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param keyArray
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
	List<DictModel> dicts = sysDictMapper.queryTableDictByKeys(table, text, code, keyArray);
	List<String> texts = new ArrayList<>(dicts.size());
	// 查询出来的顺序可能是乱的,需要排个序
	for (String key : keyArray) {
		for (DictModel dict : dicts) {
			if (key.equals(dict.getValue())) {
				texts.add(dict.getText());
				break;
			}
		}
	}
	return texts;
}
 
Example 3
Source File: SysDictServiceImpl.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典,包含text和value
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param keyArray
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
	List<DictModel> dicts = sysDictMapper.queryTableDictByKeys(table, text, code, keyArray);
	List<String> texts = new ArrayList<>(dicts.size());
	// 查询出来的顺序可能是乱的,需要排个序
	for (String key : keyArray) {
		for (DictModel dict : dicts) {
			if (key.equals(dict.getValue())) {
				texts.add(dict.getText());
				break;
			}
		}
	}
	return texts;
}
 
Example 4
Source File: SysDictServiceImpl.java    From jeecg-boot with Apache License 2.0 6 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典,包含text和value
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param keyArray
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
	List<DictModel> dicts = sysDictMapper.queryTableDictByKeys(table, text, code, keyArray);
	List<String> texts = new ArrayList<>(dicts.size());
	// 查询出来的顺序可能是乱的,需要排个序
	for (String key : keyArray) {
		for (DictModel dict : dicts) {
			if (key.equals(dict.getValue())) {
				texts.add(dict.getText());
				break;
			}
		}
	}
	return texts;
}
 
Example 5
Source File: SysDictServiceImpl.java    From jeecg-cloud with Apache License 2.0 3 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典值text
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param key
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public String queryTableDictTextByKey(String table,String text,String code, String key) {
	log.info("无缓存dictTable的时候调用这里!");
	return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
}
 
Example 6
Source File: SysDictServiceImpl.java    From jeecg-boot-with-activiti with MIT License 3 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典值text
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param key
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public String queryTableDictTextByKey(String table,String text,String code, String key) {
	log.info("无缓存dictTable的时候调用这里!");
	return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
}
 
Example 7
Source File: SysDictServiceImpl.java    From teaching with Apache License 2.0 3 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典值text
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param key
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public String queryTableDictTextByKey(String table,String text,String code, String key) {
	log.info("无缓存dictTable的时候调用这里!");
	return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
}
 
Example 8
Source File: SysDictServiceImpl.java    From jeecg-boot with Apache License 2.0 3 votes vote down vote up
/**
 * 通过查询指定table的 text code 获取字典值text
 * dictTableCache采用redis缓存有效期10分钟
 * @param table
 * @param text
 * @param code
 * @param key
 * @return
 */
@Override
@Cacheable(value = CacheConstant.SYS_DICT_TABLE_CACHE)
public String queryTableDictTextByKey(String table,String text,String code, String key) {
	log.info("无缓存dictTable的时候调用这里!");
	return sysDictMapper.queryTableDictTextByKey(table,text,code,key);
}