|
...
|
...
|
@@ -91,9 +91,10 @@ public class DictUtils |
|
|
|
{
|
|
|
|
StringBuilder propertyString = new StringBuilder();
|
|
|
|
List<SysDictData> datas = getDictCache(dictType);
|
|
|
|
|
|
|
|
if (StringUtils.isNotNull(datas))
|
|
|
|
if (StringUtils.isNull(datas))
|
|
|
|
{
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
}
|
|
|
|
if (StringUtils.containsAny(separator, dictValue))
|
|
|
|
{
|
|
|
|
for (SysDictData dict : datas)
|
|
...
|
...
|
@@ -118,7 +119,6 @@ public class DictUtils |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return StringUtils.stripEnd(propertyString.toString(), separator);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -134,8 +134,11 @@ public class DictUtils |
|
|
|
{
|
|
|
|
StringBuilder propertyString = new StringBuilder();
|
|
|
|
List<SysDictData> datas = getDictCache(dictType);
|
|
|
|
|
|
|
|
if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas))
|
|
|
|
if (StringUtils.isNull(datas))
|
|
|
|
{
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
}
|
|
|
|
if (StringUtils.containsAny(separator, dictLabel))
|
|
|
|
{
|
|
|
|
for (SysDictData dict : datas)
|
|
|
|
{
|
|
...
|
...
|
@@ -163,6 +166,48 @@ public class DictUtils |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据字典类型获取字典所有值
|
|
|
|
*
|
|
|
|
* @param dictType 字典类型
|
|
|
|
* @return 字典值
|
|
|
|
*/
|
|
|
|
public static String getDictValues(String dictType)
|
|
|
|
{
|
|
|
|
StringBuilder propertyString = new StringBuilder();
|
|
|
|
List<SysDictData> datas = getDictCache(dictType);
|
|
|
|
if (StringUtils.isNull(datas))
|
|
|
|
{
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
}
|
|
|
|
for (SysDictData dict : datas)
|
|
|
|
{
|
|
|
|
propertyString.append(dict.getDictValue()).append(SEPARATOR);
|
|
|
|
}
|
|
|
|
return StringUtils.stripEnd(propertyString.toString(), SEPARATOR);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据字典类型获取字典所有标签
|
|
|
|
*
|
|
|
|
* @param dictType 字典类型
|
|
|
|
* @return 字典值
|
|
|
|
*/
|
|
|
|
public static String getDictLabels(String dictType)
|
|
|
|
{
|
|
|
|
StringBuilder propertyString = new StringBuilder();
|
|
|
|
List<SysDictData> datas = getDictCache(dictType);
|
|
|
|
if (StringUtils.isNull(datas))
|
|
|
|
{
|
|
|
|
return StringUtils.EMPTY;
|
|
|
|
}
|
|
|
|
for (SysDictData dict : datas)
|
|
|
|
{
|
|
|
|
propertyString.append(dict.getDictLabel()).append(SEPARATOR);
|
|
|
|
}
|
|
|
|
return StringUtils.stripEnd(propertyString.toString(), SEPARATOR);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除指定字典缓存
|
|
|
|
*
|
|
|
|
* @param key 字典键
|
...
|
...
|
|