Merge branch 'yyhouc'

This commit is contained in:
glj 2023-05-23 18:07:21 +08:00
commit 2eb4055d56
2 changed files with 9 additions and 2 deletions

View File

@ -81,6 +81,7 @@ public class OtherDataServiceImpl extends ServiceImpl<OtherDataMapper, EntityDat
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean uploadData(OtherData OtherData) { public boolean uploadData(OtherData OtherData) {
//路径拼接 //路径拼接
List<String> link = new ArrayList<>(); List<String> link = new ArrayList<>();
//文件大小 //文件大小

View File

@ -68,7 +68,7 @@ public class DictBizController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "列表", notes = "传入dict") @ApiOperation(value = "列表", notes = "传入dict")
public R<List<DictBizVO>> list(@ApiIgnore @RequestParam Map<String, Object> dict) { public R<List<DictBizVO>> list(@ApiIgnore @RequestParam Map<String, Object> dict) {
List<DictBiz> list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort)); List<DictBiz> list = dictService.list(Condition.getQueryWrapper(dict, DictBiz.class).lambda().orderByAsc(DictBiz::getSort).eq(DictBiz::getIsDeleted, "0"));
return R.data(DictBizWrapper.build().listNodeVO(list)); return R.data(DictBizWrapper.build().listNodeVO(list));
} }
@ -183,7 +183,13 @@ public class DictBizController {
dictBiz.setId(null); dictBiz.setId(null);
//添加父子关系 //添加父子关系
dictBiz.setParentId(dict.getId()); dictBiz.setParentId(dict.getId());
//如果是根节点设置code使用根节点的key
if(dict.getParentId()==0){
dictBiz.setCode(dict.getDictKey()); dictBiz.setCode(dict.getDictKey());
//否则使用父节点的code
}else{
dictBiz.setCode(dict.getCode());
}
} }
return R.success(dictService.saveBatch(list)||list.size()==0?"操作成功":"操作失败"); return R.success(dictService.saveBatch(list)||list.size()==0?"操作成功":"操作失败");
} }