|
@@ -89,11 +89,12 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
|
|
|
for (String s : split) {
|
|
|
DirEntity byId = this.findById(Long.valueOf(s));
|
|
|
log.info("文件夹名称查询{}",byId);
|
|
|
- DirEntity byIdAndName = findByIdAndName(param.getParentId(), byId.getName());
|
|
|
- if (ObjectUtil.isNotNull(byIdAndName)){
|
|
|
- log.info("{}",byIdAndName);
|
|
|
- throw new BaseRuntimeException(ErrorEnum.FAILURE_CODE_3104.code(), ErrorEnum.FAILURE_CODE_3104.message());
|
|
|
-
|
|
|
+ if (ObjectUtil.isNotNull(byId)){
|
|
|
+ DirEntity byIdAndName = findByIdAndName(param.getParentId(), byId.getName(),byId.getType());
|
|
|
+ if (ObjectUtil.isNotNull(byIdAndName)){
|
|
|
+ log.info("{}",byIdAndName);
|
|
|
+ throw new BaseRuntimeException(ErrorEnum.FAILURE_CODE_3104.code(), ErrorEnum.FAILURE_CODE_3104.message());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -151,10 +152,12 @@ public class DirServiceImpl extends IBaseServiceImpl<DirEntity, Long> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DirEntity findByIdAndName(Long parentId, String name) {
|
|
|
+ public DirEntity findByIdAndName(Long parentId, String name,String type) {
|
|
|
DirEntity parm=new DirEntity();
|
|
|
parm.setName(name);
|
|
|
parm.setParentId(parentId);
|
|
|
+ parm.setType(type);
|
|
|
+ parm.setIsDelete(0);
|
|
|
return getBaseMapper().selectOne(parm);
|
|
|
}
|
|
|
|