mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
fix role
This commit is contained in:
parent
14c0c27cd3
commit
cca3170260
@ -26,6 +26,8 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author bwcx_jzy
|
||||
@ -105,9 +107,13 @@ public class UserRoleDynamicController extends BaseServerController {
|
||||
Class<? extends BaseDynamicService> baseOperService = dynamicData.getBaseOperService();
|
||||
BaseDynamicService bean = SpringUtil.getBean(baseOperService);
|
||||
List<RoleModel.TreeLevel> list = bean.parserValue(classFeature, value);
|
||||
if (CollUtil.isNotEmpty(list)) {
|
||||
dynamicData1.put(classFeature, list);
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
continue;
|
||||
}
|
||||
if (classFeature.getParent() != null) {
|
||||
list = list.stream().filter(treeLevel -> CollUtil.isNotEmpty(treeLevel.getChildren())).collect(Collectors.toList());
|
||||
}
|
||||
dynamicData1.put(classFeature, list);
|
||||
}
|
||||
item.setDynamicData2(dynamicData1);
|
||||
roleService.updateItem(item);
|
||||
|
@ -215,9 +215,6 @@ public interface BaseDynamicService {
|
||||
if (children != null && !children.isEmpty()) {
|
||||
treeLevel.setChildren(parserChildren(classFeature, children));
|
||||
}
|
||||
if (CollUtil.isEmpty(treeLevel.getChildren())) {
|
||||
return;
|
||||
}
|
||||
String id = jsonObject.getString("id");
|
||||
if (id.contains(StrUtil.COLON)) {
|
||||
id = id.split(StrUtil.COLON)[2];
|
||||
|
Loading…
Reference in New Issue
Block a user