OCT 1. 修正字典加载问题
This commit is contained in:
parent
0ff040bb7a
commit
96a914a380
|
@ -1,5 +1,6 @@
|
|||
package com.cmhi.cf.configure;
|
||||
|
||||
import com.cmhi.cf.common.CommonStatus;
|
||||
import com.cmhi.cf.database.common.mapper.DictTypeMapper;
|
||||
import com.houkunlin.system.dict.starter.bean.DictTypeVo;
|
||||
import com.houkunlin.system.dict.starter.provider.DictProvider;
|
||||
|
@ -27,7 +28,7 @@ public class DictProviderConfigure implements DictProvider {
|
|||
dictTypeMapper.selectAllWithRelations().forEach(k -> {
|
||||
DictTypeVo.DictTypeBuilder builder = DictTypeVo.newBuilder(k.getDictType(), k.getDictName(), k.getRemark());
|
||||
k.getDictDataList()
|
||||
.stream().filter(m -> "0".equals(m.getStatus()))
|
||||
.stream().filter(m -> m.getStatus().equals(CommonStatus.NORMAL.getValue()))
|
||||
.forEach(v -> builder.add(v.getDictValue(), v.getDictLabel(), v.getDictSort()));
|
||||
dictItems.add(builder.build());
|
||||
});
|
||||
|
|
|
@ -53,13 +53,11 @@ public class DictionaryServiceImpl implements DictionaryService {
|
|||
SystemDictStarter.getBean(SystemDictProvider.class).dictTypeIterator().forEachRemaining(k -> {
|
||||
if (dictType.contains(k.getType())) {
|
||||
List<DictDetails> children = new ArrayList<>();
|
||||
k.getChildren().forEach(m -> {
|
||||
children.add(DictDetails.builder()
|
||||
.title(m.getTitle())
|
||||
.value((Integer) m.getValue())
|
||||
.disabled(false)
|
||||
.build());
|
||||
});
|
||||
k.getChildren().forEach(m -> children.add(DictDetails.builder()
|
||||
.title(m.getTitle())
|
||||
.value((Integer) m.getValue())
|
||||
.disabled(false)
|
||||
.build()));
|
||||
sysDictList.add(DictContent.builder()
|
||||
.dictName(k.getType())
|
||||
.children(children)
|
||||
|
@ -174,15 +172,13 @@ public class DictionaryServiceImpl implements DictionaryService {
|
|||
ret.forEach(k -> {
|
||||
List<DictDetails> children = new ArrayList<>();
|
||||
|
||||
k.getDictDataList().forEach(m -> {
|
||||
children.add(DictDetails.builder()
|
||||
.id(m.getId())
|
||||
.title(m.getDictLabel())
|
||||
.value(m.getDictValue())
|
||||
.sorted(m.getDictSort())
|
||||
.disabled(m.getStatus() != 0)
|
||||
.build());
|
||||
});
|
||||
k.getDictDataList().forEach(m -> children.add(DictDetails.builder()
|
||||
.id(m.getId())
|
||||
.title(m.getDictLabel())
|
||||
.value(m.getDictValue())
|
||||
.sorted(m.getDictSort())
|
||||
.disabled(m.getStatus() != 0)
|
||||
.build()));
|
||||
|
||||
resp.add(DictContent.builder()
|
||||
.dictId(k.getId())
|
||||
|
|
Loading…
Reference in New Issue