加入是否为层级判断,增加查看权限

This commit is contained in:
s2042968 2025-02-05 16:41:02 +08:00
parent b58e3bd04a
commit f889a6a073
2 changed files with 5 additions and 2 deletions

View File

@ -121,13 +121,13 @@ public class EdFileInfoController {
return edFileInfoService.uploadRecord(pageNum, pageSize);
}
// @RequiredPermission(value = FilePermission.VIEW)
@RequiredPermission(value = FilePermission.VIEW)
@RequestMapping(value = "/fileDetail", method = RequestMethod.GET)
public ElectromagneticResult<?> detail(@RequestParam String id) {
return edFileInfoService.detail(id);
}
// @RequiredPermission(value = FilePermission.VIEW)
@RequiredPermission(value = FilePermission.VIEW)
@RequestMapping(value = "/queryChildFolder", method = RequestMethod.GET)
public ElectromagneticResult<?> queryChildFolder(@RequestParam String parentId) {
return edFileInfoService.queryChildFolder(parentId);

View File

@ -1171,6 +1171,9 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
if(file.getId().length()<6){
throw new StringIndexOutOfBoundsException("此文件的FILE_CODE小于六位"+id);
}
if(file.getPrjDir().equals(Boolean.TRUE)){
return id;
}
return file.getFileCode().substring(0, 6);
}