diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/OtherDataServiceImpl.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/OtherDataServiceImpl.java index ab44c48..bde7efa 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/OtherDataServiceImpl.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/service/impl/OtherDataServiceImpl.java @@ -81,6 +81,7 @@ public class OtherDataServiceImpl extends ServiceImpl link = new ArrayList<>(); //文件大小 diff --git a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java index 1ba0ca8..20eda9b 100644 --- a/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java +++ b/kn-sys-manager/src/main/java/org/springblade/auth/system/controller/DictBizController.java @@ -68,7 +68,7 @@ public class DictBizController { @ApiOperationSupport(order = 2) @ApiOperation(value = "列表", notes = "传入dict") public R> list(@ApiIgnore @RequestParam Map dict) { - List list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort)); + List list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort).eq(DictBiz::getIsDeleted, "0")); return R.data(DictBizWrapper.build().listNodeVO(list)); } @@ -183,7 +183,13 @@ public class DictBizController { dictBiz.setId(null); //添加父子关系 dictBiz.setParentId(dict.getId()); - dictBiz.setCode(dict.getDictKey()); + //如果是根节点,设置code使用根节点的key + if(dict.getParentId()==0){ + dictBiz.setCode(dict.getDictKey()); + //否则使用父节点的code + }else{ + dictBiz.setCode(dict.getCode()); + } } return R.success(dictService.saveBatch(list)||list.size()==0?"操作成功":"操作失败"); }