|
|
@@ -171,6 +171,9 @@ public class DocInfoController extends BaseController {
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "docId", value = "文件ID", required = true), @ApiImplicitParam(name = "spaceId", value = "空间ID"), @ApiImplicitParam(name = "dirId", value = "新目录ID", required = true)})
|
|
|
public AjaxResult move(Long docId, Long dirId) {
|
|
|
DocInfo info = docInfoService.selectDocInfoByDocId(docId);
|
|
|
+ if (info == null) {
|
|
|
+ return error("该文件已失效!");
|
|
|
+ }
|
|
|
info.setDirId(dirId);
|
|
|
|
|
|
info.setUpdateBy(SecurityUtils.getUsername());
|
|
|
@@ -187,6 +190,9 @@ public class DocInfoController extends BaseController {
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "docId", value = "文件ID", required = true), @ApiImplicitParam(name = "spaceId", value = "空间ID"), @ApiImplicitParam(name = "dirId", value = "新目录ID", required = true)})
|
|
|
public AjaxResult copy(Long docId, Long spaceId, Long dirId) {
|
|
|
DocInfo info = docInfoService.selectDocInfoByDocId(docId);
|
|
|
+ if (info == null) {
|
|
|
+ return error("该文件已失效!");
|
|
|
+ }
|
|
|
String ext = info.getFileType();
|
|
|
//因为数据库存的是带 . 的,所以要先截取掉这个 .
|
|
|
ext = ext.substring(1);
|